Skip to content

Commit

Permalink
add curly interpolation, but respect phx-no-curly-interpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
SteffenDE committed Dec 8, 2024
1 parent f985313 commit 5366f3a
Showing 1 changed file with 89 additions and 1 deletion.
90 changes: 89 additions & 1 deletion syntaxes/heex.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
{
"include": "#elixir-embedded"
},
{
"include": "#tag-no-curly"
},
{
"include": "#slotable"
},
Expand All @@ -37,6 +40,9 @@
},
{
"include": "#tag"
},
{
"include": "#interpolation"
}
],
"repository": {
Expand Down Expand Up @@ -169,6 +175,88 @@
}
]
},
"tag-no-curly": {
"name": "meta.element.tag.with-no-curly-interpolation",
"contentName": "meta.tag.content.with-no-curly-interpolation",
"begin": "(<)([A-Za-z0-9\\-:]+)(?=[^>]*\\bphx-no-curly-interpolation\\b)([^>]*)>",
"beginCaptures": {
"0": {
"patterns": [
{
"include": "#slotable"
},
{
"include": "#component"
},
{
"include": "#tag-style"
},
{
"include": "#tag-script"
},
{
"include": "#tag"
}
]
},
"3": {
"patterns": [
{
"include": "#node-attributes"
}
]
}
},
"end": "(</)(\\2)(>)",
"endCaptures": {
"1": {
"name": "punctuation.definition.tag.begin.html"
},
"2": {
"name": "entity.name.tag.html"
},
"3": {
"name": "punctuation.definition.tag.end.html"
}
},
"patterns": [
{
"name": "meta.tag.content.with-no-curly-interpolation",
"patterns": [
{
"include": "#html-comment"
},
{
"include": "#deprecated-heex-comment"
},
{
"include": "#heex-comment"
},
{
"include": "#heex-multi-line-comment"
},
{
"include": "#elixir-embedded"
},
{
"include": "#slotable"
},
{
"include": "#component"
},
{
"include": "#tag-style"
},
{
"include": "#tag-script"
},
{
"include": "#tag"
}
]
}
]
},
"tag": {
"patterns": [
{
Expand Down Expand Up @@ -700,4 +788,4 @@
]
}
}
}
}

0 comments on commit 5366f3a

Please sign in to comment.