-
6803e99c: Adopt the hand-written
liquid-html-parserfor performanceReplace the parser-combinator-based Liquid/HTML parser with a hand-written recursive-descent parser. The new parser is significantly faster, adds resilient parsing (it recovers from malformed input instead of bailing), and is adapted to the theme-tools source model.
theme-language-server-common,theme-check-common,prettier-plugin-liquid, andtheme-graphare updated to consume the new parser.
- b1bca3f9: Upgrade prettier to v3 (internal)
- 8f523617: Bump to TypeScript 5
- 1ebf9246: Detect and fix use of boolean expressions
- 6a1512db: Bump ohm-js to v17
- 067a75eb: Improve parsing logic around aliases
- 7ff54f02: Remove dead code
- 1a95a190: Introduce parsing support for a
@promptannotation within{% doc %}tags
- de877551: Modify parsing logic to capture leading whitespace on
descriptionandexamplenodes and add aisInlineproperty to indicate whether content was provided inline or on a new line.
- 79c9f773: [LiquidDoc] Add parsing support for implicit descriptions.
- 10493c9d: Added
LoopNamedTagsto identify tags that provides iteration - 9563715a: [internal] Fix typo in liquid doc parser
-
c4bbf3b5: [LiquidDoc]: Add parser support for @description annotations. These can be placed anywhere within the header, and can span numerous lines.
-
d9dbc265: - Support parsing incomplete content_for tags in completion context
- Support content_for param completion
-
2db3047f: Support
renderparam completion based on liquid docs- If you defined liquid doc parameters on a snippet, they will appear as completion options
for parameters when rendered by a
rendertag.
- If you defined liquid doc parameters on a snippet, they will appear as completion options
for parameters when rendered by a
-
261c2958: Support liquid doc inner tags completion + hover
@param,@description,@examplewill support code completion whenever being typed inside ofdoctag@param,@description,@examplecan be hovered to show their help doc
-
e57979e0: Add parsing and prettier support for example node in liquiddoc Example:
{% doc %} @example Here is my content {% enddoc %} -
8c9f5bcf: Add parsing support for optional param delimiters
[]. Parameters with[]around a valid param name will be considered optional. Param names can be any alphanumeric character,-, or_.
- 841ca6d1: Update repository URL for all packages to be case sensitive
- dd0cd4d2: [Internal] Modify paramDescription to be null when empty
- ac55577a: Add prettier support for LiquidDoc {% doc %} tag and @param annotation
- 8912fab8: Update Ohm grammar for ContentFor tag to extract arguments correctly Update ValidContentForArguments check to report deprecated context. argument usage
-
1f54be13: Add support for incomplete filter statements
Adds the ability to continue to parse liquid code that would otherwise be considered invalid:
{{ product | image_url: width: 100, c█ }}The above liquid statement will now successfully parse in all placeholder modes so that we can offer completion options for filter parameters.
- c4813ff: Fix LiquidComparison types
- 568d53b: Add support for the
content_forLiquid tag
- c664d52: LiquidBranch nodes should always report a blockEndPosition of 0 length
- 1c73710: Fix bug where whitespace stripping character was assigned to variable
- d1f9fef: (Internal) Add
unclosednode information to LiquidHTMLASTError - 70e2241: Fix broken parsing of liquid attribute names
- 0990c47: Fix config validation problem that required optional settings
- 617b766: Add parser support for trailing commas at the end of Liquid tags and filters
- fa02f1b: Fix parsing of
}}inside{% %}and vice-versa
- 8451075:
package.jsonand README cleanups
-
636895f: Add support for unclosed HTML Element nodes inside branching code
Breaking changes
HtmlDanglingMarkerOpennodes are folded intoHtmlElementnodes-
You can identify a node without its closing tag by looking at
blockEndPositionnode.source.slice( node.blockEndPosition.start, node.blockEndPosition.end, ) === "";
-
Why the change?
HtmlDanglingMarkerOpennodes did not have children, since we added support for nodes without closing markers, we removed that node type entirely.
- 636895f: Allow 'HtmlDanglingMarkerClose' nodes to have non-dangling marker siblings
- 78813ea: Add internal-use property to DocumentNode
- 0d71145: Add
nodesproperty to RawMarkupKind to allow for subtree visiting- Partially breaking in the sense where Liquid (not LiquidHTML) syntax errors will be reported from within scripts, styles, and JSON blobs
- 02f4731: Hello world