I have a string that has new lines in. I am wanting to convert these to HTML s, but I\'m having a hard time detecting them.
Imagine a JavaScri
This is a small adition to @Andrew Dunn's post above
Combining the 2 is possible to generate readable JS and matching output
var foo = "Bob\n\ is\n\ cool.\n\";