Skip to content

Commit 0101c89

Browse files
committed
F#: improve string pattern
1 parent 09f2005 commit 0101c89

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

components/prism-fsharp.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Prism.languages.fsharp = Prism.languages.extend('clike', {
1010
}
1111
],
1212
'keyword': /\b(?:let|return|use|yield)(?:!\B|\b)|\b(abstract|and|as|assert|base|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|global|if|in|inherit|inline|interface|internal|lazy|match|member|module|mutable|namespace|new|not|null|of|open|or|override|private|public|rec|select|static|struct|then|to|true|try|type|upcast|val|void|when|while|with|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall|trait|virtual|volatile)\b/,
13-
'string': /@?("""|"|')((\\|\n)?.)*?\1B?/,
13+
'string': /(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|("|')(?:\\\1|\\?(?!\1)[\s\S])*\1)B?/,
1414
'preprocessor': /^\s*#.*/m,
1515
'number': [
1616
/\b-?0x[\da-fA-F]+(un|lf|LF)?\b/,

components/prism-fsharp.min.js

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

0 commit comments

Comments
 (0)