• Login
Community
  • Login

HTML official elements not recognized by Notepad++

Scheduled Pinned Locked Moved General Discussion
htmlw3c
5 Posts 4 Posters 5.8k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I
    Ivan Miller
    last edited by Jan 12, 2017, 8:43 AM

    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?
    Thank you.

    C 1 Reply Last reply Jan 12, 2017, 3:24 PM Reply Quote 0
    • C
      Claudia Frank @Ivan Miller
      last edited by Claudia Frank Jan 12, 2017, 3:25 PM Jan 12, 2017, 3:24 PM

      @Ivan-Miller

      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 .

      Cheers
      Claudia

      1 Reply Last reply Reply Quote 2
      • P
        PeterJones
        last edited by Jan 13, 2017, 4:01 PM

        Interesting,

        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.xml file, it did include those (except <math>).

        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 langs.model.xml to %APPDATA%\Notepad++\langs.xml, and that fixed the highlighting of those elements for me, so I hope they will for Ivan, as well.

        C 1 Reply Last reply Jan 13, 2017, 4:10 PM Reply Quote 2
        • D
          dail
          last edited by Jan 13, 2017, 4:09 PM

          @PeterJones

          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.xml is only used if langs.xml doesn’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).

          See: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/1205

          1 Reply Last reply Reply Quote 1
          • C
            Claudia Frank @PeterJones
            last edited by Claudia Frank Jan 13, 2017, 4:10 PM Jan 13, 2017, 4:10 PM

            @PeterJones

            you are right, this is one of npps mantras.
            Don’t change customized config files.
            Thx for clarification.

            Cheers
            Claudia

            1 Reply Last reply Reply Quote 0
            4 out of 5
            • First post
              4/5
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors