Skip to content

Commit f184251

Browse files
author
jin
committed
fixed decorator and data hlight
1 parent 85db0a1 commit f184251

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

syntax2/md/md.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ namespace $ {
3434
'code-comment-block' : /(?:\/\*[^]*?\*\/|\/\+[^]*?\+\/|<![^]*?>)/ ,
3535
'code-link' : /(?:\w+:\/\/|#)\S+?(?=\s|\\\\|""|$)/ ,
3636
'code-comment-inline' : /\/\/.*?(?:$|\/\/)/ ,
37-
'code-string' : /(?:".*?"|'.*?'|`.*?`|\/.+?\/[dygimsu]*(?!\p{Letter})|(?:^|[ \t])\\[^\n]*\n)/u ,
37+
'code-string' : /(?:".*?"|'.*?'|`.*?`|\/.+?\/[dygimsu]*(?!\p{Letter})|[ \t]*\\[^\n]*)/u ,
3838
'code-number' : /[+-]?(?:\d*\.)?\d+\w*/ ,
3939
'code-call' : /\.?\w+ *(?=\()/ ,
4040
'code-sexpr' : /\((\w+ )/ ,
4141
'code-field' : /(?:(?:\.|::|->)\w+|[\w-]+\??\s*:(?!\/\/|:))/ ,
4242
'code-keyword' : /\b(throw|readonly|unknown|keyof|typeof|never|from|class|struct|interface|type|function|extends|implements|module|namespace|import|export|include|require|var|val|let|const|for|do|while|until|in|out|of|new|if|then|else|switch|case|this|return|async|await|yield|try|catch|break|continue|get|set|public|private|protected|string|boolean|number|null|undefined|true|false|void|int|float|ref)\b/ ,
4343
'code-global' : /[$]+\w*|\b[A-Z][a-z0-9]+[A-Z]\w*/ ,
4444
'code-word' : /\w+/ ,
45-
'code-decorator' : /@\s*\S+/ ,
45+
'code-decorator' : /@.+/ ,
4646
'code-tag' : /<\/?[\w-]+\/?>?|&\w+;/ ,
4747
'code-punctuation' : /[\-\[\]\{\}\(\)<=>~!\?@#%&\*_\+\\\/\|;:\.,\^]+?/ ,
4848
})

0 commit comments

Comments
 (0)