We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 007752d commit d197c0fCopy full SHA for d197c0f
src/utils/highlight.ts
@@ -21,6 +21,30 @@ import 'prismjs/components/prism-swift.js';
21
22
const DEFAULT_LANG = 'clike';
23
24
+Prism.languages.insertBefore(
25
+ 'javascript',
26
+ 'string',
27
+ {
28
+ 'property string': {
29
+ pattern: /([{,]\s*)"(?:\\.|[^\\"\r\n])*"(?=\s*:)/i,
30
+ lookbehind: true,
31
+ },
32
+ } as any,
33
+ undefined as any,
34
+);
35
+
36
37
38
+ 'punctuation',
39
40
+ property: {
41
+ pattern: /([{,]\s*)[a-z]\w*(?=\s*:)/i,
42
43
44
45
46
47
48
/**
49
* map language names to Prism.js names
50
*/
0 commit comments