mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-20 03:10:39 -07:00
Stash array of tag names in a constant
This commit is contained in:
@@ -36,8 +36,11 @@ module Liquid
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
ELSE_TAG_NAMES = ['elsif', 'else'].freeze
|
||||||
|
private_constant :ELSE_TAG_NAMES
|
||||||
|
|
||||||
def unknown_tag(tag, markup, tokens)
|
def unknown_tag(tag, markup, tokens)
|
||||||
if ['elsif', 'else'].include?(tag)
|
if ELSE_TAG_NAMES.include?(tag)
|
||||||
push_block(tag, markup)
|
push_block(tag, markup)
|
||||||
else
|
else
|
||||||
super
|
super
|
||||||
|
|||||||
Reference in New Issue
Block a user