summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinda_pp <rhysd@users.noreply.github.com>2024-05-27 01:22:26 +0900
committerGitHub <noreply@github.com>2024-05-26 18:22:26 +0200
commit86071925ede1030d86e764054e36ef8ab56fc666 (patch)
tree3467e44e16a03b101b57b0e24075274d2a80cb13
parent76174e71101503900d54d38e00b3a869af1fdd85 (diff)
runtime(typescriptreact): fix highlighting nested and escaped quotes in string props (#14852)
Signed-off-by: rhysd <lin90162@yahoo.co.jp> Signed-off-by: Christian Brabandt <cb@256bit.org>
-rw-r--r--runtime/syntax/typescriptreact.vim5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/syntax/typescriptreact.vim b/runtime/syntax/typescriptreact.vim
index 9dc9a2b797..061ec4d81e 100644
--- a/runtime/syntax/typescriptreact.vim
+++ b/runtime/syntax/typescriptreact.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: TypeScript with React (JSX)
" Maintainer: The Vim Project <https://github.com/vim/vim>
-" Last Change: 2024 May 24
+" Last Change: 2024 May 26
" Based On: Herrington Darkholme's yats.vim
" Changes: See https://github.com/HerringtonDarkholme/yats.vim
" Credits: See yats.vim on github
@@ -118,7 +118,8 @@ syntax match tsxEqual +=+ display contained
" <tag id="sample">
" s~~~~~~e
-syntax region tsxString contained start=+["']+ end=+["']+ contains=tsxEntity,@Spell display
+syntax region tsxString contained start=+"+ skip=+\\"+ end=+"+ contains=tsxEntity,@Spell display
+syntax region tsxString contained start=+'+ skip=+\\'+ end=+'+ contains=tsxEntity,@Spell display
" <tag key={this.props.key}>
" s~~~~~~~~~~~~~~e