My 5th book "50 Tips on JavaScript" is on sale. Go get it from https://50tips.dev.
Illustrated guide to 50 of the most interesting JavaScript topics.

newstr

Cleaning up <pre> tag content

I'm blogging for different technologies, but very often I need to add some code in my articles. This little PHP function helps me to keep the text in my <pre> tags clean for prettify. It simply removes the <br>'s and keeps the html tags.

...read more