How To Prevent Automatic HTML Line Breaks

Author: , May 14th, 2020

Recently, I had a list of command-line options in a table, and my browser was automatically inserting a line-break in-between the hyphen and the option character.

To prevent this, I simply added a little CSS:

NOTE: Never use the

HTML directive – it is obsolete!

How To Replace All Line Breaks With <br /> Using JavaScript

Author: , April 16th, 2012

How To Escape Newlines In PHP For Javascript

Author: , January 11th, 2012

You must use all three lines together for it to work…YMMV:

How to Convert DOS Line Breaks to UNIX in VIM

Author: , September 29th, 2009