Current code try to color entire tag and attributes with SCE_H_TAGUNKNOWN, which will fails with some characters in attribute value.
See the screenshots, I think current behavior it's ugly, characters after space is not part of tag name.
<html>
<baz src="images/test-1.png" id="foo">
</baz>
<baz src="images/test.png" id="bar">
</baz>
</html>
This should be fixed to, at least, ignore the '/' if not followed by '>'.
Styling the entire tag as bad is fine as it makes mistakes more obvious although some users may have a different preference.
Using the above example text, the first
bazline doesn't look like the image in SciTE. The entire tag is red just like the secondbaz. The ending code is triggered by the sequence '/>', not '/' by itself.I will check it again, the top image is made by
Version 4.2.1 Oct 25 2019 14:26:14. It indeed not occurs inVersion 4.2.1 Oct 28 2019 18:58:55.It still has bug for
!:Fixed with [5f4c6b] by not moving on start of tag when state not changing from SCE_H_TAGUNKNOWN.
Related
Commit: [5f4c6b]
Add option to only color tag name as unknown still helps, especially when viewing embedded SVG or MathML in HTML.
It's rare for application to bundle these elements/attributes with HTML lexer.
A property "html.unknown.tag.only.name" is added, the last change is added after
if (eClass != SCE_H_TAGUNKNOWN) {. The property name and description need improved in some way.There seems have two bugs in lexicalClassesHTML and lexicalClassesXML, SCE_H_ERRORTAGUNKNOWN and SCE_H_ERRORATTRIBUTEUNKNOWN are not defined in Scintilla.iface, instead SCE_H_TAGUNKNOWN and SCE_H_ATTRIBUTEUNKNOWN are defined.
Possible a script need added to check these inconsistents.
Seems [5f4c6b] is conflict with [feature-requests:#1299]: the whole string before id attribute been treated as tag, so first and second been colored as custom tag.
Related
Feature Requests:
#1299Commit: [5f4c6b]
Probably safest to revert [feature-requests:#1299] as it hasn't yet been included in a release.
Related
Feature Requests:
#1299Updated classifyTagHTML() to ignore characters after space.
Committed as [6e109a].
Related
Commit: [6e109a]