Skip to content

Commit 2ad4132

Browse files
authored
Merge branch 'main' into php-c-line-comment-in-functions
2 parents 7a6a1f2 + d21e285 commit 2ad4132

File tree

5 files changed

+13
-1
lines changed

5 files changed

+13
-1
lines changed

CHANGES.md

+4
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
New Grammars:
44

55
- added 3rd party Aiken grammar to SUPPORTED_LANGUAGES [Josh Marchand][]
6+
- added 3rd party VoltScript grammar to SUPPORTED_LANGUAGES [Chester Moses][]
67

78
Core Grammars:
89

10+
- fix(javascript) correctly highlight 'for await' again [wolfgang42][]
911
- enh(csp) add missing directives / keywords from MDN (7 more) [Max Liashuk][]
1012
- enh(ada) add new `parallel` keyword, allow `[]` for Ada 2022 [Max Reznik][]
1113
- enh(php) support single line and hash comments in attributes, constructor and functions [Antoine Musso][]
@@ -16,6 +18,8 @@ CONTRIBUTORS
1618
[Max Liashuk]: https://github.com/probil
1719
[Max Reznik]: https://github.com/reznikmm
1820
[Antoine Musso]: https://github.com/hashar
21+
[Chester Moses]: https://github.com/Chester-Moses-HCL
22+
1923

2024
## Version 11.11.1
2125

SUPPORTED_LANGUAGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ The table below shows the full list of languages (and corresponding classes/alia
253253
| Vala | vala | |
254254
| Verilog | verilog, v | |
255255
| Vim Script | vim | |
256+
| VoltScript | voltscript, vss, lotusscript, lss | [highlightjs-voltscript](https://github.com/HCL-TECH-SOFTWARE/highlightjs-voltscript) |
256257
| WGSL | wgsl | [highlightjs-wgsl](https://github.com/highlightjs/highlightjs-wgsl) |
257258
| X# | xsharp, xs, prg | [highlightjs-xsharp](https://github.com/InfomindsAg/highlightjs-xsharp) |
258259
| X++ | axapta, x++ | |

src/languages/javascript.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,8 @@ export default function(hljs) {
387387
noneOf([
388388
...ECMAScript.BUILT_IN_GLOBALS,
389389
"super",
390-
"import"
390+
"import",
391+
"await",
391392
].map(x => `${x}\\s*\\(`)),
392393
IDENT_RE, regex.lookahead(/\s*\(/)),
393394
className: "title.function",

test/markup/javascript/keywords.expect.txt

+3
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@
1111
<span class="hljs-keyword">return</span> <span class="hljs-regexp">/\d+[\s/]/g</span>;
1212
}
1313
<span class="hljs-keyword">using</span> val = <span class="hljs-title function_">condition</span>();
14+
<span class="hljs-keyword">for</span> <span class="hljs-keyword">await</span> (<span class="hljs-keyword">const</span> item <span class="hljs-keyword">of</span> items) {
15+
<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(item);
16+
}
1417
}

test/markup/javascript/keywords.txt

+3
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ function $initHighlight(block, cls) {
1111
return /\d+[\s/]/g;
1212
}
1313
using val = condition();
14+
for await (const item of items) {
15+
console.log(item);
16+
}
1417
}

0 commit comments

Comments
 (0)