Community
    • Login

    Self-closing Tags

    Scheduled Pinned Locked Moved General Discussion
    5 Posts 4 Posters 4.3k Views 4 Watching
    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 Offline
      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 Offline
        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 Offline
          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 Offline
            MAPJe71
            last edited by

            W3C HTML5 void elements

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

              See PR#2379

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors