Skip to content

Commit fa540ab

Browse files
authoredNov 22, 2021
AQL: Differenciate between strings and identifiers (#3183)
1 parent 9f5e511 commit fa540ab

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed
 

‎components/prism-aql.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ Prism.languages.aql = {
66
greedy: true
77
},
88
'string': {
9-
pattern: /(["'´`])(?:(?!\1)[^\\\r\n]|\\.)*\1/,
9+
pattern: /(["'])(?:(?!\1)[^\\\r\n]|\\.)*\1/,
10+
greedy: true
11+
},
12+
'identifier': {
13+
pattern: /([´`])(?:(?!\1)[^\\\r\n]|\\.)*\1/,
1014
greedy: true
1115
},
1216
'variable': /@@?\w+/,

‎components/prism-aql.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,9 @@
1+
´filter´
2+
`sort`
3+
4+
----------------------------------------------------
5+
6+
[
7+
["identifier", "´filter´"],
8+
["identifier", "`sort`"]
9+
]

‎tests/languages/aql/string_feature.test

+2-6
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
'this is a longer string.'
1111
'the path separator on Windows is \\'
1212

13-
´filter´
14-
`sort`
15-
1613
----------------------------------------------------
1714

1815
[
@@ -21,13 +18,12 @@
2118
["string", "\"this is a \\\"quoted\\\" word\""],
2219
["string", "\"this is a longer string.\""],
2320
["string", "\"the path separator on Windows is \\\\\""],
21+
2422
["string", "'yikes!'"],
2523
["string", "'don\\'t know'"],
2624
["string", "'this is a \"quoted\" word'"],
2725
["string", "'this is a longer string.'"],
28-
["string", "'the path separator on Windows is \\\\'"],
29-
["string", "´filter´"],
30-
["string", "`sort`"]
26+
["string", "'the path separator on Windows is \\\\'"]
3127
]
3228

3329
----------------------------------------------------

0 commit comments

Comments
 (0)
Please sign in to comment.