Merge pull request #1322 from ashmaroli/else-tag-names

Stash array of tag names in a constant
This commit is contained in:
Justin Li
2020-10-21 12:09:14 -04:00
committed by GitHub

View File

@@ -36,8 +36,11 @@ module Liquid
end
end
ELSE_TAG_NAMES = ['elsif', 'else'].freeze
private_constant :ELSE_TAG_NAMES
def unknown_tag(tag, markup, tokens)
if ['elsif', 'else'].include?(tag)
if ELSE_TAG_NAMES.include?(tag)
push_block(tag, markup)
else
super