Skip to content
Permalink
Browse files
Elm: Recognise unicode escapes as valid Char (#3105)
  • Loading branch information
hoonweiting committed Oct 3, 2021
1 parent d908e45 commit 736c581d630177b58e9a490229fc05ef46f2959a
Showing with 10 additions and 4 deletions.
  1. +1 −1 components/prism-elm.js
  2. +1 −1 components/prism-elm.min.js
  3. +8 −2 tests/languages/elm/char_feature.test
@@ -1,7 +1,7 @@
Prism.languages.elm = {
'comment': /--.*|\{-[\s\S]*?-\}/,
'char': {
pattern: /'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+))'/,
pattern: /'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+|u\{[0-9a-fA-F]+\}))'/,
greedy: true
},
'string': [

Some generated files are not rendered by default. Learn more.

@@ -3,6 +3,9 @@
'\n'
'\23'
'\xFE'
'\u{0000}'
'\u{1F648}'
'\u{10FFFF}'

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

@@ -11,9 +14,12 @@
["char", "'\\''"],
["char", "'\\n'"],
["char", "'\\23'"],
["char", "'\\xFE'"]
["char", "'\\xFE'"],
["char", "'\\u{0000}'"],
["char", "'\\u{1F648}'"],
["char", "'\\u{10FFFF}'"]
]

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

Checks for chars.
Checks for chars.

0 comments on commit 736c581

Please sign in to comment.