fix: report error for malformed else/elsif/endif/endfor, #713

This commit is contained in:
Harttle
2024-07-05 01:23:33 +08:00
parent d141c4bdd2
commit 22b5a12333
8 changed files with 41 additions and 47 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ Though we're trying to be compatible with the Ruby version, there are still some
* LiquidJS-defined filters: [json][json], group_by, group_by_exp, where_exp, jsonify, inspect, etc.
* Tags/filters that don't depend on Shopify platform are borrowed from [Shopify][shopify-tags].
* Tags/filters that don't depend on Jekyll framework are borrowed from [Jekyll][jekyll-filters].
* Some tags/filters behave differently: [date][date] filter.
* Some tags/filters behave differently: [date][date] filter, malformed tags (like duplicated `else`, extra args for `endif`) throw errors in LiquidJS.
[date]: https://liquidjs.com/filters/date.html
[layout]: ../tags/layout.html
+1 -1
View File
@@ -34,7 +34,7 @@ LiquidJS 一直很重视兼容于 Ruby 版本的 Liquid。Liquid 模板语言最
* LiquidJS 自己定义的过滤器:[json][json]。
* 从 [Shopify][shopify-tags] 借来的不依赖 Shopify 平台的标签/过滤器。
* 从 [Jekyll][jekyll-filters] 借来的不依赖 Jekyll 框架的标签/过滤器。
* 有些过滤器和标签表现不同:比如 [date][date]。
* 有些过滤器和标签表现不同:比如 [date][date],非法的标签(比如重复的 `else``endif` 的多余参数)在 LiquidJS 中会抛出异常
[layout]: ../tags/layout.html
[render]: ../tags/render.html