Skip to content

Commit 38fb9b5

Browse files
committed
fix syntax for multievent
1 parent 1718440 commit 38fb9b5

2 files changed

Lines changed: 35 additions & 18 deletions

File tree

.changeset/happy-tools-wait.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"hyperbook-studio": patch
3+
---
4+
5+
fix syntax for multievent

platforms/vscode/syntaxes/hyperbook.json

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -94,24 +94,36 @@
9494
"repository": {
9595
"directive-multievent": {
9696
"name": "meta.directive.multievent",
97-
"begin": ":::multievent",
98-
"end": ":::",
97+
"begin": "(^|\\G)(:{3,})(multievent)\\s*$",
98+
"end": "(^|\\G)(\\2)\\s*$",
9999
"patterns": [
100100
{
101-
"name": "keyword.control.multievent.syntax",
102-
"match": "\\{([rRcCaAkKlLtTzSvwyYBWnX]{1}[0-9]*)?\\{"
103-
},
104-
{
105-
"name": "keyword.control.multievent.correct",
106-
"match": "!\\w+"
107-
},
108-
{
109-
"name": "string.unquoted.multievent.content",
110-
"match": "[^{}\\n]+(?=\\}\\})"
101+
"name": "meta.multievent.nested",
102+
"begin": "\\{([rRcCaBbAkKlLtTzSvwyYBWnXhH]{1}[0-9]*)\\{",
103+
"beginCaptures": {
104+
"1": {
105+
"name": "keyword.control.multievent.nested.identifier"
106+
}
107+
},
108+
"end": "\\}\\}",
109+
"endCaptures": {
110+
"0": {
111+
"name": "punctuation.definition.multievent.nested.end"
112+
}
113+
},
114+
"patterns": [
115+
{
116+
"name": "string.unquoted.multievent.nested.content",
117+
"match": "[^{}~\\n]+"
118+
},
119+
{
120+
"name": "punctuation.definition.multievent.nested",
121+
"match": "[{}|~]+"
122+
}
123+
]
111124
},
112125
{
113-
"name": "punctuation.definition.multievent",
114-
"match": "[{}|~]+"
126+
"include": "hyperbook"
115127
}
116128
]
117129
},
@@ -137,7 +149,7 @@
137149
},
138150
"patterns": [
139151
{
140-
"include": "text.html.markdown"
152+
"include": "hyperbook"
141153
}
142154
]
143155
},
@@ -209,7 +221,7 @@
209221
},
210222
"patterns": [
211223
{
212-
"include": "text.html.markdown"
224+
"include": "hyperbook"
213225
}
214226
]
215227
},
@@ -381,7 +393,7 @@
381393
},
382394
"patterns": [
383395
{
384-
"include": "text.html.markdown"
396+
"include": "hyperbook"
385397
}
386398
]
387399
},
@@ -567,7 +579,7 @@
567579
},
568580
"patterns": [
569581
{
570-
"include": "text.html.markdown"
582+
"include": "hyperbook"
571583
}
572584
]
573585
},

0 commit comments

Comments
 (0)