aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorZufu Liu <unknown>2019-11-17 07:40:03 +1100
committerZufu Liu <unknown>2019-11-17 07:40:03 +1100
commitc01af44367b40f9b15d10f58dc05d439908b6dee (patch)
tree0297b4f8a37fdad7f6e3c9310bb840367cabd671
parent1b4fa798daa2d6a33256257f0481f650f7d76e01 (diff)
downloadscintilla-mirror-c01af44367b40f9b15d10f58dc05d439908b6dee.tar.gz
Feature [feature-requests:#1320] Fix tag classification when '-' present.
Caused by conflict with [feature-requests:#1299].
-rw-r--r--lexers/LexHTML.cxx5
1 files changed, 4 insertions, 1 deletions
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<std::string> &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));
}