Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,16 @@ module.exports = grammar({
),

_expression_value: ($) =>
choice(/[^{}]+/, seq("{", optional($._expression_value), "}")),
// Note that we alias "{" and "}", so they are not targetted by
// delimiter highlight queries.
choice(
/[^{}]+/,
seq(
alias("{", "left"),
repeat($._expression_value),
alias("}", "right")
)
),

special_attribute: ($) => seq($.special_attribute_name, "=", $.expression),

Expand Down
5 changes: 4 additions & 1 deletion queries/injections.scm
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@

; expressions live within HTML tags, and do not need to be combined
; <link href={ Routes.static_path(..) } />
; note that we include children, because expression_value may consist
; of multiple nodes, when the value contains { and }
((expression (expression_value) @injection.content)
(#set! injection.language "elixir"))
(#set! injection.language "elixir")
(#set! injection.include-children))
33 changes: 19 additions & 14 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions src/node-types.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading