From c01af44367b40f9b15d10f58dc05d439908b6dee Mon Sep 17 00:00:00 2001 From: Zufu Liu Date: Sun, 17 Nov 2019 07:40:03 +1100 Subject: Feature [feature-requests:#1320] Fix tag classification when '-' present. Caused by conflict with [feature-requests:#1299]. --- lexers/LexHTML.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lexers') diff --git a/lexers/LexHTML.cxx b/lexers/LexHTML.cxx index 17c0846aa..8a06e9884 100644 --- a/lexers/LexHTML.cxx +++ b/lexers/LexHTML.cxx @@ -283,9 +283,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