mirror of
https://github.com/kemko/liquid.git
synced 2026-01-01 15:55:40 +03:00
Stash array of tag names in a constant
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user