From bca46389a09757f984f3415107fe1adf9e8271e4 Mon Sep 17 00:00:00 2001 From: Zufu Liu Date: Sun, 17 Nov 2019 07:40:03 +1100 Subject: Backport: Feature [feature-requests:#1320] Fix tag classification when '-' present. Caused by conflict with [feature-requests:#1299]. Backport of changeset 7765:6e109af6b450. --- lexers/LexHTML.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lexers/LexHTML.cxx') diff --git a/lexers/LexHTML.cxx b/lexers/LexHTML.cxx index 61ee917ab..01d8e85e8 100644 --- a/lexers/LexHTML.cxx +++ b/lexers/LexHTML.cxx @@ -284,9 +284,12 @@ int classifyTagHTML(Sci_PositionU start, Sci_PositionU end, bool caseSensitive, bool isXml, bool allowScripts, const std::set &nonFoldingTags) { std::string tag; - // Copy after the '<' + // Copy after the '<' and stop before ' ' for (Sci_PositionU cPos = start; cPos <= end; cPos++) { const char ch = styler[cPos]; + if (IsASpace(ch)) { + break; + } if ((ch != '<') && (ch != '/')) { tag.push_back(caseSensitive ? ch : MakeLowerCase(ch)); } -- cgit v1.2.3