Skip to content

Instantly share code, notes, and snippets.

@emirotin
Last active June 20, 2017 16:44
Show Gist options
  • Save emirotin/1f3c8839b98028a95bcb7046f9f5598a to your computer and use it in GitHub Desktop.
Save emirotin/1f3c8839b98028a95bcb7046f9f5598a to your computer and use it in GitHub Desktop.
function logText(text) {
const elPre = document.createElement('PRE')
const elCode = document.createElement('CODE')
elPre.innerHTML = text
elCode.appendChild(elPre)
document.body.appendChild(elCode)
}
var text = "\
page 1\n\
page 1.1\n\
page 1.2\n\
page 1.2.1\n\
page 2\n\
page 3\n\
page 3.1\n\
page 3.2\n\
page 4\n\
page 4.1\n\
page 4.1.1\n\
page 4.1.1.1\n\
page 4.2\n\
page 5\
"
logText(text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment