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