Disable rendering of tag based on register (#1162)

* Disable rendering of tag based on register

* Improvements to disable tag

* Resolve disbale tag tests

* Test disable_tags register

* disabled_tags is now always avaiable

* Allow multiple tags to be disabled at once

* Move disabled check to block_body

* Code improvements

* Remove redundant nil check

* Improve disabled tag error output

* Improve disable tag API

* Code improvements

* Switch disabled? to not mutate output

* Fix array handling shortcut in disable_tags
This commit is contained in:
Mike Angell
2019-09-26 00:18:30 +10:00
committed by GitHub
parent f4d134cd5c
commit 0db9c56f34
12 changed files with 191 additions and 8 deletions
+8
View File
@@ -104,6 +104,14 @@ module Liquid
output
end
def disabled?(_context)
false
end
def disabled_tags
[]
end
private
def parse_filter_expressions(filter_name, unparsed_args)