Skip to content

Whitespace before type parameter list breaks parsing #289

Open
@tobil4sk

Description

@tobil4sk

The syntax does not accept type parameters if there is a space before <.

image

This patch seems to solve the issue:

--- a/syntax/ts-common/type.vim
+++ b/syntax/ts-common/type.vim
@@ -26,7 +26,7 @@ syntax match typescriptGenericDefault /=/
 " class A extend B<T> {} // ClassBlock
 " func<T>() // FuncCallArg
 syntax region typescriptTypeArguments matchgroup=typescriptTypeBrackets
-  \ start=/\></ end=/>/
+  \ start=/</ end=/>/
   \ contains=@typescriptType
   \ nextgroup=typescriptFuncCallArg,@typescriptTypeOperator
   \ contained skipwhite

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions