Initial options passing

This commit is contained in:
Tristan Hume
2013-07-30 14:44:41 -04:00
parent 1458396733
commit 84f0c1bef8
8 changed files with 31 additions and 37 deletions
+3 -2
View File
@@ -15,13 +15,14 @@ module Liquid
EasyParse = /^ *(\w+(?:\.\w+)*) *$/
attr_accessor :filters, :name
def initialize(markup)
def initialize(markup, options = {})
@markup = markup
@name = nil
@warning = nil
@options = options || {}
case Template.error_mode
case @options[:error_mode] || Template.error_mode
when :strict then strict_parse(markup)
when :lax then lax_parse(markup)
when :warn