mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-16 09:20:42 -07:00
Merge pull request #364 from collectiveidea/instrument-rendering-with-hooks
Profiling the rendering of a liquid template
This commit is contained in:
@@ -14,6 +14,7 @@ module Liquid
|
||||
FilterParser = /(?:\s+|#{QuotedFragment}|#{ArgumentSeparator})+/o
|
||||
EasyParse = /\A *(\w+(?:\.\w+)*) *\z/
|
||||
attr_accessor :filters, :name, :warnings
|
||||
attr_accessor :line_number
|
||||
|
||||
def initialize(markup, options = {})
|
||||
@markup = markup
|
||||
@@ -34,6 +35,10 @@ module Liquid
|
||||
end
|
||||
end
|
||||
|
||||
def raw
|
||||
@markup
|
||||
end
|
||||
|
||||
def lax_parse(markup)
|
||||
@filters = []
|
||||
if markup =~ /\s*(#{QuotedFragment})(.*)/om
|
||||
|
||||
Reference in New Issue
Block a user