Skip to content

Commit bad20eb

Browse files
vitalkamadeus
authored andcommitted
Case agnostic JSDoc tags
The latest documentation for JSDoc3 use lowercase tags (http://usejsdoc.org/), but the oldest versions may use camel case (see https://code.google.com/p/jsdoc-toolkit/wiki/TagReference). The current syntax supports both of them.
1 parent a08e6cc commit bad20eb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

syntax/javascript.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ if !exists("javascript_ignore_javaScriptdoc")
5555
syntax region jsDocComment matchgroup=jsComment start="/\*\*\s*" end="\*/" contains=jsDocTags,jsCommentTodo,jsCvsTag,@jsHtml,@Spell fold
5656

5757
" tags containing a param
58-
syntax match jsDocTags contained "@\(alias\|augments\|borrows\|class\|constructs\|default\|defaultvalue\|emits\|exception\|exports\|extends\|file\|fires\|kind\|listens\|member\|memberOf\|mixes\|module\|name\|namespace\|requires\|throws\|var\|variation\|version\)\>" nextgroup=jsDocParam skipwhite
58+
syntax match jsDocTags contained "@\(alias\|augments\|borrows\|class\|constructs\|default\|defaultvalue\|emits\|exception\|exports\|extends\|file\|fires\|kind\|listens\|member\|member[oO]f\|mixes\|module\|name\|namespace\|requires\|throws\|var\|variation\|version\)\>" nextgroup=jsDocParam skipwhite
5959
" tags containing type and param
6060
syntax match jsDocTags contained "@\(arg\|argument\|param\|property\)\>" nextgroup=jsDocType skipwhite
6161
" tags containing type but no param
6262
syntax match jsDocTags contained "@\(callback\|enum\|external\|this\|type\|typedef\|return\|returns\)\>" nextgroup=jsDocTypeNoParam skipwhite
6363
" tags containing references
6464
syntax match jsDocTags contained "@\(lends\|see\)\>" nextgroup=jsDocSeeTag skipwhite
6565
" other tags (no extra syntax)
66-
syntax match jsDocTags contained "@\(abstract\|access\|author\|classdesc\|constant\|const\|constructor\|copyright\|deprecated\|desc\|description\|event\|example\|fileOverview\|function\|global\|ignore\|inner\|instance\|license\|method\|mixin\|overview\|private\|protected\|public\|readonly\|since\|static\|todo\|summary\|undocumented\|virtual\)\>"
66+
syntax match jsDocTags contained "@\(abstract\|access\|author\|classdesc\|constant\|const\|constructor\|copyright\|deprecated\|desc\|description\|event\|example\|file[oO]verview\|function\|global\|ignore\|inner\|instance\|license\|method\|mixin\|overview\|private\|protected\|public\|readonly\|since\|static\|todo\|summary\|undocumented\|virtual\)\>"
6767

6868
syntax region jsDocType start="{" end="}" oneline contained nextgroup=jsDocParam skipwhite
6969
syntax match jsDocType contained "\%(#\|\"\|\w\|\.\|:\|\/\)\+" nextgroup=jsDocParam skipwhite

0 commit comments

Comments
 (0)