• Login
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.
  • A
    Allen Hoessli
    last edited by Sep 28, 2016, 10:32 PM

    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.

    C 1 Reply Last reply Sep 29, 2016, 12:25 AM Reply Quote 0
    • C
      Claudia Frank @Allen Hoessli
      last edited by Sep 29, 2016, 12:25 AM

      @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
      • D
        dail
        last edited by Sep 29, 2016, 12:35 PM

        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
        • M
          MAPJe71
          last edited by Sep 29, 2016, 1:00 PM

          W3C HTML5 void elements

          1 Reply Last reply Reply Quote 2
          • M
            MAPJe71
            last edited by Oct 1, 2016, 10:04 PM

            See PR#2379

            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