Sublime Forum

Begin-End inner content match problem

#1

I think there is some kind of a problem here. Simple documentation block comment syntax definition:

{ "comment": "Block comment", "name": "comment.block.js", "begin": "(/\\*\\*?(?!/))", "beginCaptures": { "1": { "name": "comment.punctuation.definition.js" } }, "patterns": { "comment": "Inner comment line (with or without preceding *)", "name": "comment.block.inner-line.js", "match": "^\\s*(\\*)", "captures": { "1": { "name": "comment.punctuation.definition.js" } } } ], "end": "(\\*/)", "endCaptures": { "1": { "name": "comment.punctuation.definition.js" } } }

According to documentaion about syntax defs (and begin-end matches): “patterns - An array of patterns to match against the begin-end content only —they are not matched against the text consumed by begin or end.”

Expected syntax parsing:
/**

  • Block documentation * comment
  • adsfasdf *
    */

And what I get:
/**

  • Block documentation * comment
  • adsfasdf *
    */

It seems like begin and end parts are also been matched.

0 Likes