Skip to content

Commit

Permalink
Support JSDoc comment optional values with negative exponents (#5596)
Browse files Browse the repository at this point in the history
* Fix src/mode/jsdoc_comment_highlight_rules.js to support JSDoc comment optional values with negative exponents like: `@param {number} [min_value=1e-5]`

* Support strings and spaces aswell
  • Loading branch information
kungfooman authored Jun 21, 2024
1 parent 16c95b3 commit ed87e6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mode/jsdoc_comment_highlight_rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var JsDocCommentHighlightRules = function() {
]
}, {
token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"],
regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.]+)(\])))/,
regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,
next: "pop"
}, {
token: "rparen.doc",
Expand Down

0 comments on commit ed87e6d

Please sign in to comment.