Reputation: 23
I want to convert a simple code to an special code which I like. see this simple code :
<html>
<body>
<a href="stack.com"> The content of the document </a>
</body>
</html>
convert to :
<html>\n\t<body>\n\t\t <a href=\"stack.com\"> The content of the document </a> \n\t</body>\n</html>
(convert linebreak to \n ; convert tabs to \t ; convert " to \") And finally put them in one line. just one line. Can you suggest me a good function or tools for this work?
Upvotes: 2
Views: 32
Reputation: 3065
First to come into mind is Notepad++ for me.
In Macro menu
- You can start recording your actions
- Replace all linebreaks with \n
- Replace all tabs with \t
- Replace all " with \"
- And save your macro to use whenever you want to use again
Upvotes: 2