From 0c3d5ee54de3a993f747f54186b73a4d2d3c44a2 Mon Sep 17 00:00:00 2001 From: Michael Sheets Date: Mon, 28 Jan 2019 05:17:51 -0600 Subject: [PATCH] Match block comments inside script attributes Fixes #99. --- Syntaxes/HTML.plist | 84 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 82 insertions(+), 2 deletions(-) diff --git a/Syntaxes/HTML.plist b/Syntaxes/HTML.plist index 211b080..228353f 100644 --- a/Syntaxes/HTML.plist +++ b/Syntaxes/HTML.plist @@ -356,7 +356,47 @@ match - [^\n"]+ + ([^\n"/]|/(?![/*]))+ + + + begin + // + beginCaptures + + 0 + + name + punctuation.definition.comment.js + + + end + (?=")|\n + name + comment.line.double-slash.js + + + begin + /\* + beginCaptures + + 0 + + name + punctuation.definition.comment.begin.js + + + end + (?=")|\*/ + endCaptures + + 0 + + name + punctuation.definition.comment.end.js + + + name + comment.block.js @@ -407,7 +447,47 @@ match - [^\n']+ + ([^\n'/]|/(?![/*]))+ + + + begin + // + beginCaptures + + 0 + + name + punctuation.definition.comment.js + + + end + (?=')|\n + name + comment.line.double-slash.js + + + begin + /\* + beginCaptures + + 0 + + name + punctuation.definition.comment.begin.js + + + end + (?=')|\*/ + endCaptures + + 0 + + name + punctuation.definition.comment.end.js + + + name + comment.block.js