mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
Ugly hack for compatibility with Rails 2.1
This commit is contained in:
@@ -132,6 +132,7 @@ module Liquid
|
|||||||
|
|
||||||
# Uses the <tt>Liquid::TemplateParser</tt> regexp to tokenize the passed source
|
# Uses the <tt>Liquid::TemplateParser</tt> regexp to tokenize the passed source
|
||||||
def tokenize(source)
|
def tokenize(source)
|
||||||
|
source = source.source if source.respond_to?(:source)
|
||||||
return [] if source.to_s.empty?
|
return [] if source.to_s.empty?
|
||||||
tokens = source.split(TemplateParser)
|
tokens = source.split(TemplateParser)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user