jado
jado

Reputation: 954

Bootstrap new lines in <code>

When trying to show code in <code>, the new lines showed as spaces/tabs.

Here's what I input:

[code]k
i
l
m
[/code]

(Except <> instead of [])

And here's what I get as output:

k i l m

I've tried inserting it with JS using \n, \r, and \r\n.

Upvotes: 0

Views: 960

Answers (1)

webzy
webzy

Reputation: 249

Use <pre> tag instead of <code> tag. Check also this question/answer

Upvotes: 1

Related Questions