Remove Liquid::BlockBody patch (#12313)

This commit is contained in:
rhymes 2021-01-18 08:09:28 +01:00 committed by GitHub
parent a63ba17b6a
commit 3750ea6544
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 22 deletions

View file

@ -1,15 +0,0 @@
# Disables {% liquid %} tag introduced in version 5.0
# see <https://github.com/Shopify/liquid/blob/master/lib/liquid/block_body.rb>
module LiquidBlockBodyExtensions
# parse_for_liquid_tag is a private method, thus we use prepend to patch it
def parse_for_liquid_tag(_tokenizer, _parse_context)
raise StandardError, "Liquid 'liquid' tag is disabled"
end
end
module Liquid
class BlockBody
prepend LiquidBlockBodyExtensions
end
end

View file

@ -1,7 +0,0 @@
require "rails_helper"
RSpec.describe Liquid, type: :lib do
it "is disabled" do
expect { Liquid::Template.parse("{% liquid %}") }.to raise_error(StandardError)
end
end