Skip to content

How are Liquid filter names syntax-highlighed using src/mode/liquid_highlight_rules.js? #5189

Answered by panoply
TomasHubelbauer asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @TomasHubelbauer

So this is likely version related in liquidjs as you can test your filters in the Kitchen Sink. (Change the theme to "Ace Tomorrow Night" to replicate the liquidjs theme playground) and highlighting will work as intended.

Additional Context

The PR I made in March for Ace actually already supports what you are seeking to achieve. The old grammar file for Liquid used by Ace didn't support custom filters and only a predefined set of filters would highlight (see diff commit ). Anyway, this is likely why your custom filters are not highlighting in the liquidjs playground, because the playgrounds version of Ace is using the old grammars.

Take a look at the original PR I mad…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@TomasHubelbauer
Comment options

Answer selected by TomasHubelbauer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants