summaryrefslogtreecommitdiffstats
path: root/syntax/basic
diff options
context:
space:
mode:
Diffstat (limited to 'syntax/basic')
-rw-r--r--syntax/basic/identifiers.vim2
-rw-r--r--syntax/basic/symbols.vim2
2 files changed, 2 insertions, 2 deletions
diff --git a/syntax/basic/identifiers.vim b/syntax/basic/identifiers.vim
index 027fbde5..4ec713b7 100644
--- a/syntax/basic/identifiers.vim
+++ b/syntax/basic/identifiers.vim
@@ -22,7 +22,7 @@ syntax match typescriptProp contained /\K\k*!\?/
syntax region typescriptIndexExpr contained matchgroup=typescriptProperty start=/\[/rs=s+1 end=/]/he=e-1 contains=@typescriptValue nextgroup=@typescriptSymbols,typescriptDotNotation,typescriptFuncCallArg skipwhite skipempty
-syntax match typescriptDotNotation /\./ nextgroup=typescriptProp skipnl
+syntax match typescriptDotNotation /\.\|?\.\|!\./ nextgroup=typescriptProp skipnl
syntax match typescriptDotStyleNotation /\.style\./ nextgroup=typescriptDOMStyle transparent
" syntax match typescriptFuncCall contained /[a-zA-Z]\k*\ze(/ nextgroup=typescriptFuncCallArg
syntax region typescriptParenExp matchgroup=typescriptParens start=/(/ end=/)/ contains=@typescriptComments,@typescriptValue,typescriptCastKeyword nextgroup=@typescriptSymbols skipwhite skipempty
diff --git a/syntax/basic/symbols.vim b/syntax/basic/symbols.vim
index 5728316a..c4c025ac 100644
--- a/syntax/basic/symbols.vim
+++ b/syntax/basic/symbols.vim
@@ -5,7 +5,7 @@ syntax match typescriptUnaryOp /[+\-~!]/
\ nextgroup=@typescriptValue
\ skipwhite
-syntax region typescriptTernary matchgroup=typescriptTernaryOp start=/?/ end=/:/ contained contains=@typescriptValue,@typescriptComments nextgroup=@typescriptValue skipwhite skipempty
+syntax region typescriptTernary matchgroup=typescriptTernaryOp start=/?[.?]\@!/ end=/:/ contained contains=@typescriptValue,@typescriptComments nextgroup=@typescriptValue skipwhite skipempty
syntax match typescriptAssign /=/ nextgroup=@typescriptValue
\ skipwhite skipempty