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
commitbca46389a09757f984f3415107fe1adf9e8271e4 (patch)
tree30cdc32bd260c5ed8cc4ce37ffaceb6edf5272f8
parentae2b6f681ac630fa1fb0314294495b71cb1ac231 (diff)
downloadscintilla-mirror-bca46389a09757f984f3415107fe1adf9e8271e4.tar.gz
Backport: Feature [feature-requests:#1320] Fix tag classification when '-' present.
Caused by conflict with [feature-requests:#1299]. Backport of changeset 7765:6e109af6b450.
-rw-r--r--lexers/LexHTML.cxx5
1 files changed, 4 insertions, 1 deletions
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<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));
}