Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Avro IDL: Removed char syntax (#3185)
  • Loading branch information
RunDevelopment committed Nov 22, 2021
1 parent fa540ab commit c780928
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 22 deletions.
17 changes: 5 additions & 12 deletions components/prism-avro-idl.js
Expand Up @@ -6,18 +6,11 @@ Prism.languages['avro-idl'] = {
pattern: /\/\/.*|\/\*[\s\S]*?\*\//,
greedy: true
},
'string': [
{
pattern: /(^|[^\\])"(?:[^\r\n"\\]|\\.)*"/,
lookbehind: true,
greedy: true
},
{
pattern: /(^|[^\\])'(?:[^\r\n'\\]|\\(?:[\s\S]|\d{1,3}))'/,
lookbehind: true,
greedy: true
}
],
'string': {
pattern: /(^|[^\\])"(?:[^\r\n"\\]|\\.)*"/,
lookbehind: true,
greedy: true
},

'annotation': {
pattern: /@(?:[$\w.-]|`[^\r\n`]+`)+/,
Expand Down
2 changes: 1 addition & 1 deletion components/prism-avro-idl.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 1 addition & 9 deletions tests/languages/avro-idl/string_feature.test
Expand Up @@ -3,19 +3,11 @@
"\""
"\n\n"

'f'
'\n'
'\34'

----------------------------------------------------

[
["string", "\"\""],
["string", "\"foo\""],
["string", "\"\\\"\""],
["string", "\"\\n\\n\""],

["string", "'f'"],
["string", "'\\n'"],
["string", "'\\34'"]
["string", "\"\\n\\n\""]
]

0 comments on commit c780928

Please sign in to comment.