Skip to content

Commit

Permalink
优化vim语法高亮中对双引号进行无效转义时的边界匹配
Browse files Browse the repository at this point in the history
  • Loading branch information
A4-Tacks committed Jan 16, 2024
1 parent f454e1c commit 23c22ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion syntax/vim/mdtlbl.vim
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ setlocal commentstring=#%s
setlocal formatoptions+=rq

" 值(Var) {{{1
syn match mdtlblStringFailedEscape /\\./ contained
syn match mdtlblStringFailedEscape /\\\%("\@=\|.\)/ contained
syn match mdtlblStringColor /\[\v%(#\x{6,8}|%(c%(lear|yan|oral)|b%(l%(ack|ue)|r%(own|ick))|white|li%(ghtgray|me)|g%(r%(ay|een)|old%(enrod)?)|darkgray|navy|r%(oyal|ed)|s%(late|ky|carlet|almon)|t%(eal|an)|acid|forest|o%(live|range)|yellow|p%(ink|urple)|ma%(genta|roon)|violet))\]/ contained
syn match mdtlblSpecialChar /^ *\\ \|\\\%([n\\[]\|$\)/ contained
syn region mdtlblString start=/"/ end=/"/ contains=mdtlblSpecialChar,mdtlblStringFailedEscape,mdtlblStringColor
Expand Down

0 comments on commit 23c22ba

Please sign in to comment.