From 56fa42417b5feaae7618e841e2e033126be76d78 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 2 Nov 2019 08:44:24 +1100 Subject: Backport: Feature [feature-requests:#1320] Fix non-alphabetic characters in unknown tags. Backport of changeset 7751:5f4c6b38cb16. --- lexers/LexHTML.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lexers/LexHTML.cxx') diff --git a/lexers/LexHTML.cxx b/lexers/LexHTML.cxx index 8fce24581..bf4a1a32a 100644 --- a/lexers/LexHTML.cxx +++ b/lexers/LexHTML.cxx @@ -287,10 +287,11 @@ int classifyTagHTML(Sci_PositionU start, Sci_PositionU end, char chAttr = SCE_H_TAGUNKNOWN; if (!tag.empty() && (tag[0] == '!')) { chAttr = SCE_H_SGML_DEFAULT; + styler.ColourTo(end, chAttr); } else if (!keywords || keywords.InList(tag.c_str())) { chAttr = SCE_H_TAG; + styler.ColourTo(end, chAttr); } - styler.ColourTo(end, chAttr); if (chAttr == SCE_H_TAG) { if (allowScripts && (tag == "script")) { // check to see if this is a self-closing tag by sniffing ahead -- cgit v1.2.3