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



  • 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?



  • 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.


Log in to reply