add liquid comment syntax w/ tests

Includes single line comment syntax with # that ignores block wrap tag requirement (e.g. {% %} enclosing line comments) for functional usage.
This commit is contained in:
unclebabykern
2024-05-29 12:17:56 -06:00
parent 0f3f027d69
commit a3b911658e
5 changed files with 56 additions and 0 deletions

View File

@@ -435,3 +435,20 @@ index 0000000..2996176
+ # TODO create the directory.
+ $(AR) rc $@ $(OBJ)
+
diff --git a/tests/example_file.liquid b/tests/example_file.liquid
new file mode 100644
index 0000000..7cccc5b
--- /dev/null
+++ b/tests/example_file.liquid
@@ -0,0 +1,11 @@
+{% comment %} TODO: remove loop logic {% endcomment %}
+{% for i in (1..3) -%}
+ # TODO: Do math here!
+ # labels: help wanted
+ {{ i }}
+{% endfor %}
+{% comment %}
+TODO: Render Liquid file
+{% assign featured_product = all_products["product_handle"] %}
+{% render "product", product: featured_product %}
+{% endcomment %}