Skip to content

Update HTML lexer/ styling: TAGUNKNOWN / ATTRIBUTEUNKNOWN #6200

@webketje

Description

@webketje

Description of the Issue

The HTML syntax highlighting doesn't do justice to HTML5 data-attributes, custom elements & custom attributes. Below is a screenshot of the Zenburn theme on a .html file:

Imgur

  • data-prefixed attributes are styled as ATTRIBUTEUNKNOWN.
  • TAGUNKNOWN styling overwrites ATTRIBUTE/ ATTRIBUTEUNKNOWN styling. (might also be the case for XML)

Steps to Reproduce the Issue

Load any HTML file with custom elements, and custom or data-attributes

Expected Behavior

  • data-prefixed attributes shouldn't be styled as ATTRIBUTEUNKNOWN: they have been part of the standard for ages and have a corresponding DOM API, see https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes.
  • TAGUNKNOWN styling shouldn't overwrite the styling for ATTRIBUTE/ ATTRIBUTEUNKNOWN. In the example above I'd expect only the <custom-element ></custom-element> to be colored rose, and the attributes to be maroon/white just like in the known tag.

Debug Information

Notepad++ v7.7.1 (64-bit)
Build time : Jun 16 2019 - 21:24:47
Path : C:\Workdir\MyApps\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : ON
OS : Windows 10 (64-bit)
Plugins : BetterMultiSelection.dll JSMinNPP.dll MenuIcons.dll mimeTools.dll NppConverter.dll NppEventExec.dll NppExec.dll NppFTP.dll NppSaveAsAdmin.dll NppSnippets.dll NppTaskList.dll OpenSelection.dll PythonScript.dll SessionMgr.dll SurroundSelection.dll XMLTools.dll _CustomizeToolbar.dll

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions