Skip to content

Commit a3207e3

Browse files
azizkprincemaple
authored andcommitted
HEEx: support new embed syntax with curly braces
1 parent 03c7cb0 commit a3207e3

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Diff for: syntaxes/HTML (HEEx).sublime-syntax

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ contexts:
6666
- match: </{{is_heex_tag_name}}
6767
scope: punctuation.definition.tag.begin.html
6868
push: [heex-end-tag-content-pop, heex-end-tag-name-pop]
69+
- include: elixir-embedded
6970

7071
heex-begin-tag-content-pop:
7172
- meta_scope: meta.tag.other.heex

Diff for: tests/syntax_test_template.html.heex

+11
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,19 @@
4646
<script>
4747
<%= @elixir %>
4848
<!-- ^^^^^^ variable.annotation.js - source.elixir -->
49+
{ "1" <> "2" }
50+
<!-- ^^^^^^^^^^^^^^ -meta.embedded.heex -->
4951
</script>
5052

53+
{"1" <> "2"}
54+
<!-- ^ punctuation.section.embedded.end.elixir -->
55+
<!-- ^^^ meta.string.elixir string.quoted.double.elixir -->
56+
<!-- ^^ keyword.operator.binary-concat.elixir -->
57+
<!-- ^^^ meta.string.elixir string.quoted.double.elixir -->
58+
<!-- ^^^^^^^^^^ source.elixir.embedded.html -->
59+
<!-- ^ punctuation.section.embedded.begin.elixir -->
60+
<!-- ^^^^^^^^^^^^ meta.embedded.heex -->
61+
5162
<table :for={user <- @users} :if={assigns[:users]}><:col :let={user}><%= user.id %></:col></table>
5263
<!-- ^^^^^^ meta.embedded.heex -->
5364
<!-- ^^^ entity.other.attribute-name.heex -->

0 commit comments

Comments
 (0)