Repository navigation
@shopify/theme-language-server-common@3.0.0
Minor Changes
- 803a88a: Require consent for third-party Theme Checks and expose structured skipped-check diagnostics to callers.
Patch Changes
-
7cb4970: Type
{% block %}and{% section %}arguments as oneBlockArgument, whose value is a scalar or a single-level array literal, instead of aLiquidNamedArgument | BlockArrayArgumentunion. Completions narrow on the argument's value. -
7cb4970: Parse the Liquid inside HTML comments. Liquid renders it, and its tags can open, branch and close blocks, so
{% if a %}<!-- {% endif %} -->no longer fails with an unclosedif.HtmlCommenthaschildren(text and Liquid) andblockStartPosition/blockEndPositionfor its delimiters.- A comment that crosses a Liquid block boundary is split there, and each part has an empty delimiter range on the split side.
- A comment that never closes ends at the end of the file, as in a browser.
- An end tag in a comment that closes no block is a parse error, as in Liquid.
- The
opaqueHtmlCommentsoption keeps comment bodies opaque.
Behavior changes
- Code that walks
childrennow visits the Liquid and text inside HTML comments. <!-- {% if a %} --><p>x</p><!-- {% endif %} -->is one comment whoseifholds<p>x</p>as text, not two comments around a<p>element.<!-- {% endif %} -->with no openifno longer parses. An unclosed<!--and{% if a %}<!-- {% endif %} -->now parse.- Code that creates
HtmlCommentnodes must setchildren,blockStartPositionandblockEndPosition.
Pass
opaqueHtmlComments: trueto get the previous tree for these templates.Checks now see the Liquid in HTML comments, and completions work inside them. Prettier prints an unclosed comment as written, and can move whitespace and line breaks inside a comment that holds a Liquid block or is split by one.
-
Updated dependencies [7cb4970]
-
Updated dependencies [7cb4970]
-
Updated dependencies [7cb4970]
-
Updated dependencies [c8099ba]
-
Updated dependencies [320fa1f]
-
Updated dependencies [5b634d9]
-
Updated dependencies [7cb4970]
-
Updated dependencies [a73b174]
-
Updated dependencies [7cb4970]
-
Updated dependencies [c587ae0]
-
Updated dependencies [7cb4970]
-
Updated dependencies [5aec106]
-
Updated dependencies [34dae62]
- @shopify/liquid-html-parser@2.12.0
- @shopify/theme-check-common@4.0.0
- @shopify/theme-graph@0.3.7