Created
October 2, 2011 10:50
-
-
Save sbp/1257340 to your computer and use it in GitHub Desktop.
Add paragraphs and style to HTML
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var link = document.createElement('link'); | |
link.rel = 'stylesheet'; | |
link.href = 'style.css'; | |
document.head.appendChild(link); | |
})(); | |
window.onload = function() { | |
document.body.innerHTML = document.body.innerHTML | |
.replace(/\n\n/g, '<p>') | |
.replace(/\n/g, '<br>'); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment