Home Download Buy Blog Forum Support

Begin-End inner content match problem

Begin-End inner content match problem

Postby ubuffon on Fri Aug 24, 2012 7:21 am

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

Code: Select all
{
    "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.
ubuffon
 
Posts: 11
Joined: Tue Jul 24, 2012 10:57 am
Location: Russia

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 22 guests