• Login
Community
  • Login

Find / Replace "><" with ">", "Enter", "<"

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
2 Posts 1 Posters 1.6k 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.
  • M
    Mark du Preez
    last edited by Mark du Preez Jun 18, 2017, 12:03 PM Jun 18, 2017, 12:01 PM

    I have an HTML document with multiple <tags> right after each other. I would like to edit it so that all tags start on a new line so

    <ul class=“mh-sub”><li class=“odd”><p class=“mh-no-listing”>Some text</p></li></ul>

    becomes

    <ul class=“mh-sub”>
    <li class=“odd”>
    <p class=“mh-no-listing”>Some text</p>
    </li>
    </ul>

    Note that the </p> is fine where it is.

    Is it possible to use Find / Replace to do this? Obviously I would find “><”, but what would I enter into the replace box? I realise that using this method, lines like this:

    <script src=“1_files/1701549626756830.js” async=“”></script>

    which is fine as it is, would become

    <script src=“1_files/1701549626756830.js” async=“”>
    </script>

    but that is also fine.

    If I can’t use Find / Replace, is there something else I can do?

    1 Reply Last reply Reply Quote 0
    • M
      Mark du Preez
      last edited by Jun 18, 2017, 1:26 PM

      The answer is to use “>\n<” in the Replace box.

      I had actually tried this before posting the question, but accidently used /n instead of \n.

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