'Multi-line regex only matches if begin & end are on the same line
I'm trying to add a bit of grammar for the Liquid language to my custom extension. Here is the bit of code in question:
{% if type == "record"
or type == "record2"
%}
records
{% else %}
no_records
{% endif %}
Then I have the following rule in my language repository:
"liquid_tags": {
"name": "source.qqql.liquid",
"begin": "\\{(\\%)",
"end": "(\\%)\\}",
"beginCaptures": {
"1": {"name": "source.qqql.liquid.tag"}
},
"endCaptures": {
"1": {"name": "source.qqql.liquid.tag"}
}
},
The problem is that the %} of the if statement is not captured. Only the other closing tags are captured because they're on the same line.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
