mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-17 09:50:48 -07:00
Revert "move line number check"
This reverts commit 939365c234.
Conflicts:
lib/liquid/template.rb
This commit is contained in:
@@ -105,7 +105,7 @@ module Liquid
|
||||
def parse(source, options = {})
|
||||
@options = options
|
||||
@profiling = options[:profile]
|
||||
@line_numbers = options.delete(:line_numbers)
|
||||
@line_numbers = options[:line_numbers] || @profiling
|
||||
@root = Document.parse(tokenize(source), DEFAULT_OPTIONS.merge(options))
|
||||
@warnings = nil
|
||||
self
|
||||
@@ -225,7 +225,7 @@ module Liquid
|
||||
end
|
||||
|
||||
def calculate_line_numbers(raw_tokens)
|
||||
return raw_tokens unless @line_numbers || @profiling
|
||||
return raw_tokens unless @line_numbers
|
||||
|
||||
current_line = 1
|
||||
raw_tokens.map do |token|
|
||||
|
||||
Reference in New Issue
Block a user