HTML official elements not recognized by Notepad++
I’m sorry that recognition (and syntax highlighting) does not work for some official HTML elements like <main> <math> <picture> <template> and <svg>.
These 5 tags are present in the W3C standards.
Is it possible to correct this please?
are you using the latest version because 4 out of the 5 are highlighted.
math is the one which is missing.
Do you know that you can fix this yourself?
For highlighting you need to edit the file langs.xml
which is either under %APPDATA%\notepad++\ or under
the installation directory (depends how you installed the npp)
For recognition you need to edit the html api file which is located
under the install_directory\plugins\APIs\html.xml.
In both files, make sure you put the new content in the correct place,
means take care about the sorting math needs to be placed between
marquee and maxlength (langs.xml).
If you feel this needs to be officially addressed open an issue at github.
I have NPP 7.2.2 (not the latest, but close), and it didn’t have any of the tags @Ivan-Miller listed as missing. When I looked at the install-directory
langs.model.xmlfile, it did include those (except
So apparently, updating NPP doesn’t automatically update the
%APPDATA%file (understandable, since some people have customized it, and the updater was probably made to not clobber those) – but that means that just “using the latest version” isn’t always sufficient to get all the updates provided in that version.
I copied the
%APPDATA%\Notepad++\langs.xml, and that fixed the highlighting of those elements for me, so I hope they will for Ivan, as well.
isn’t always sufficient to get all the updates provided in that version.
You are correct. This has bugged me for a while.
langs.model.xmlis only used if
langs.xmldoesn’t exist. That’s why if a user reports their styling is incorrect it is usually a good idea to delete
langs.xml(but custom user settings could get lost).
you are right, this is one of npps mantras.
Don’t change customized config files.
Thx for clarification.