Skip to content

Commit d7d2ca3

Browse files
JessicaJHeergrunber
authored andcommitted
Add suport to auto-close curly brace before '<'
Signed-off-by: Jessica He <[email protected]>
1 parent 5595892 commit d7d2ca3

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

language-support/qute/language-configuration.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@
1313
{ "open": "[", "close": "]"},
1414
{ "open": "(", "close": ")" },
1515
{ "open": "'", "close": "'" },
16+
{ "open": "<", "close": ">" },
1617
{ "open": "\"", "close": "\"" },
1718
{ "open": "{!", "close": "!", "notIn": [ "comment", "string" ]}
1819
],
20+
"autoCloseBefore": ";:.,=}])<> \n\t",
1921
"surroundingPairs": [
2022
{ "open": "'", "close": "'" },
2123
{ "open": "\"", "close": "\"" },
@@ -29,5 +31,5 @@
2931
"start": "^\\s*{!\\s*#region\\b.*!}",
3032
"end": "^\\s*{!\\s*#endregion\\b.*!}"
3133
}
32-
}
33-
}
34+
}
35+
}

language-support/qute/test.qute.html

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,22 @@ <h2>{sample.name ?: 'Unknown'}</h2>
3838

3939
{! 2.1.1.1. Current Context !}
4040
{#each items}
41-
{count}. {it.name}
41+
{count}. {it.name}
4242
{/each}
4343

4444
{! Another form of iteration... !}
4545
{#for item in items}
46-
{count}. {item.name}
46+
{count}. {item.name}
4747
{/for}
4848

4949
<html>
50-
{item.name}
50+
{item.name}
5151
<ul>
52-
{#for item in item.getDerivedItems()}
52+
{#for item in item.getDerivedItems()}
5353
<li>
54-
{item.name}
54+
{item.name}
5555
is derived from
56-
{data:item.name}
56+
{data:item.name}
5757
</li>
5858
{/for}
5959
</ul>
@@ -72,15 +72,15 @@ <h2>{sample.name ?: 'Unknown'}</h2>
7272

7373
{! 2.1.2.1. Loop Section !}
7474
{#each items}
75-
{it.name}
75+
{it.name}
7676
{/each}
7777

7878
{#for item in items}
7979
{item.name}
8080
{/for}
8181

8282
{#each items}
83-
{count}. {it.name}
83+
{count}. {it.name}
8484
{/each}
8585

8686

@@ -130,7 +130,7 @@ <h2>{sample.name ?: 'Unknown'}</h2>
130130

131131
{! 2.1.2.3. With Section !}
132132
{#with item.parent}
133-
{name}
133+
{name}
134134
{/with}
135135

136136
{#with item.parent as myParent}
@@ -149,8 +149,8 @@ <h2>{sample.name ?: 'Unknown'}</h2>
149149
</body>
150150
</html>
151151

152-
{#include base}
153-
{#title}My Title{/title}
152+
{#include base}
153+
{#title}My Title{/title}
154154
{#body}
155155
<div>
156156
My body.
@@ -166,14 +166,14 @@ <h2>{sample.name ?: 'Unknown'}</h2>
166166
<ul>
167167
{#each items}
168168
<li>
169-
{#item this showImage=true /}
169+
{#item this showImage=true /}
170170
</li>
171171
{/each}
172172
</ul>
173173

174174

175175
{! 3.1. Injecting Beans Directly In Templates !}
176-
{inject:foo.price}
176+
{inject:foo.price}
177177

178178

179179
{! 3.2. Parameter Declarations !}
@@ -192,7 +192,7 @@ <h1>{title}</h1>
192192

193193
{! Qute grammar highlighting works in html tags and strings !}
194194
<body>
195-
<div
195+
<div
196196
{! Comment highlighting works inside html tags too !}
197197
class='myClass'>
198198
First name: <input type="text" name="fname" value='{person.name}'>

0 commit comments

Comments
 (0)