From db106ae058d94a45d9e6d9b7ed84c6b00f2cb36b Mon Sep 17 00:00:00 2001 From: Dylan Thacker-Smith Date: Thu, 16 Sep 2021 10:13:57 -0400 Subject: [PATCH 1/2] Clarify that the error_mode: :warn parse option is only for strict errors --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6802a717..fb876290 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ when templates are invalid. You can enable this new parser like this: ```ruby Liquid::Template.error_mode = :strict # Raises a SyntaxError when invalid syntax is used -Liquid::Template.error_mode = :warn # Adds errors to template.errors but continues as normal +Liquid::Template.error_mode = :warn # Adds strict errors to template.errors but continues as normal Liquid::Template.error_mode = :lax # The default mode, accepts almost anything. ``` From 0e14d539a3b04d1bd68ef978e687abc3de1f048d Mon Sep 17 00:00:00 2001 From: Dylan Thacker-Smith Date: Thu, 16 Sep 2021 10:15:45 -0400 Subject: [PATCH 2/2] README: Use newer hash syntax for the error_mode parse option --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fb876290..f9d57320 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ Liquid::Template.error_mode = :lax # The default mode, accepts almost anything. If you want to set the error mode only on specific templates you can pass `:error_mode` as an option to `parse`: ```ruby -Liquid::Template.parse(source, :error_mode => :strict) +Liquid::Template.parse(source, error_mode: :strict) ``` This is useful for doing things like enabling strict mode only in the theme editor.