Add support for LiquidDoc#20
Conversation
|
Hmm, converting to draft while I debug the test. |
f2224f2 to
b4ab379
Compare
|
Ok, I‘m no longer getting errors on the CI Syntax tests for 4134, but it’s not green either. Open to any feedback for how I can test this better. I tried running local tests with https://github.com/SublimeText/UnitTesting but am getting a lot of errors in rules I did not edit (possibly false positives?). |
|
Those tests fail due to various structural changes of core syntaxes, this branch is no longer compatible with. This branch just contains common changes, which is valid for all three maintained release branches to avoid duplicate commits/changes needed to be made in each of them individually. Only those release branches contain ST version specific commits needed to maintain compatibility. I've removed tests against "latest" ST versions in develop branch to help future tests to succeed. With regards to LiquidDoc, do we really need an external syntax definition? Wouldn't it be sufficient to implement them as normal contexts within Liquid? I'll look into it. |
Adds basic support for LiquidDoc and the
{% doc %}/{% enddoc %}tags.https://shopify.dev/docs/storefronts/themes/tools/liquid-doc
https://shopify.dev/docs/api/liquid/tags/theme-tags#doc
I’m not too attached to any of the scope names, feel free to change them if there are more suitable ones available that I’m not aware of.
The official VS Code extension treats everything that follows
@exampleas Liquid HTML. I opted for a simpler implementation where it’s not highlighted and remains a comment, primarily because I’m not sure what should terminate the@exampleLiquid HTML scope as there’s no end keyword, but also because I’m wary of performance implications of embedding Liquid HTML inside a syntax that’s embedded in Liquid HTML.