vscode-highlight
vscode-highlight copied to clipboard
Potential bug with multiline flag
"(^.*)": {
"regexFlags": "mg",
"decorations": [ { "color": "red" } ]
},
Above matches only the first line, instead of all lines. Related: #63
I got this working with following expression
"((?:(?:^(?:\/\\*\\s*.*)(?:\\s*\\*\\s*.*)+)(?:\\s*.*\\*\/)\\s*$))": {
"regexFlags": "gm",
"decorations": [
{
"overviewRulerColor": "#1411ca",
"backgroundColor": "#943da0",
"color": "#1f1f1f",
"fontWeight": "bold"
},
{
"backgroundColor": "#a04c3d",
"color": "#1f1f1f"
}
]
}
It should match multiline comments where each new line between /* */
starts with an asterisk
/*
* line
* another
* one more
*/