Revert "move line number check"

This reverts commit 939365c234.

Conflicts:
	lib/liquid/template.rb
This commit is contained in:
Florian Weingarten
2014-09-06 10:21:17 -04:00
parent ce06ed4bb1
commit debac5dd0b
+2 -2
View File
@@ -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|