Skip to content

Commit c780928

Browse files
authoredNov 22, 2021
Avro IDL: Removed char syntax (#3185)
1 parent fa540ab commit c780928

File tree

3 files changed

+7
-22
lines changed

3 files changed

+7
-22
lines changed
 

‎components/prism-avro-idl.js

+5-12
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,11 @@ Prism.languages['avro-idl'] = {
66
pattern: /\/\/.*|\/\*[\s\S]*?\*\//,
77
greedy: true
88
},
9-
'string': [
10-
{
11-
pattern: /(^|[^\\])"(?:[^\r\n"\\]|\\.)*"/,
12-
lookbehind: true,
13-
greedy: true
14-
},
15-
{
16-
pattern: /(^|[^\\])'(?:[^\r\n'\\]|\\(?:[\s\S]|\d{1,3}))'/,
17-
lookbehind: true,
18-
greedy: true
19-
}
20-
],
9+
'string': {
10+
pattern: /(^|[^\\])"(?:[^\r\n"\\]|\\.)*"/,
11+
lookbehind: true,
12+
greedy: true
13+
},
2114

2215
'annotation': {
2316
pattern: /@(?:[$\w.-]|`[^\r\n`]+`)+/,

‎components/prism-avro-idl.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tests/languages/avro-idl/string_feature.test

+1-9
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,11 @@
33
"\""
44
"\n\n"
55

6-
'f'
7-
'\n'
8-
'\34'
9-
106
----------------------------------------------------
117

128
[
139
["string", "\"\""],
1410
["string", "\"foo\""],
1511
["string", "\"\\\"\""],
16-
["string", "\"\\n\\n\""],
17-
18-
["string", "'f'"],
19-
["string", "'\\n'"],
20-
["string", "'\\34'"]
12+
["string", "\"\\n\\n\""]
2113
]

0 commit comments

Comments
 (0)
Please sign in to comment.