Skip to content

Commit 75331be

Browse files
authoredOct 5, 2021
Nim: Fixed backtick identifier (#3118)
1 parent 15cb3b7 commit 75331be

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed
 

‎components/prism-nim.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ Prism.languages.nim = {
1616
}
1717
},
1818
// We don't want to highlight operators inside backticks
19-
'ignore': {
19+
'identifier': {
2020
pattern: /`[^`\r\n]+`/,
21+
greedy: true,
2122
inside: {
2223
'punctuation': /`/
2324
}

‎components/prism-nim.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
var `var` = 42
2+
3+
----------------------------------------------------
4+
5+
[
6+
["keyword", "var"],
7+
["identifier", [
8+
["punctuation", "`"],
9+
"var",
10+
["punctuation", "`"]
11+
]],
12+
["operator", "="],
13+
["number", "42"]
14+
]

0 commit comments

Comments
 (0)
Please sign in to comment.