Community
    • Login

    Self-closing Tags

    Scheduled Pinned Locked Moved General Discussion
    5 Posts 4 Posters 3.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.
    • Allen HoessliA
      Allen Hoessli
      last edited by

      Is there a way to stop Notepad++ from adding a closing tag to the self-closing tags. For example, when I use the <input> tag, it adds </input> when I insert > at the end of the tag. I like how it automatically pairs the HTML tags, but I don’t want it to add a closing tag if it is a self-closing tag.

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC
        Claudia Frank @Allen Hoessli
        last edited by

        @Allen-Hoessli

        afaik, I don’t think it’s possible to prevent this by npp natively.
        What comes into my mind would be a scripting solution by using
        Python or Lua Script …

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • dailD
          dail
          last edited by

          It would need to be a minor code change within Notepad++.

          See:

          https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/src/ScitillaComponent/AutoCompletion.cpp#L423

          I’m no HTML expert but I’d assume that input is not the only self closing tag that needs added to that list.

          1 Reply Last reply Reply Quote 2
          • MAPJe71M
            MAPJe71
            last edited by

            W3C HTML5 void elements

            1 Reply Last reply Reply Quote 2
            • MAPJe71M
              MAPJe71
              last edited by

              See PR#2379

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