Hacker News new | ask | show | jobs
by playingalong 617 days ago
Useful? Yes.

But then you need some way to provide the exact indentation/spacing in some cases. And the easiest is to provide them verbatim.

1 comments

HTML has the "pre" element that does this.
pre does a lot more than respect newlines.
"white-space:pre-line" in CSS should make it only break on hard enters. There are a bunch of values; see e.g. MDN.

Can be used on any element of course, not just <pre>.

No?

https://searchfox.org/mozilla-central/source/layout/style/re...

The Firefox default style sets a fixed width font and sets a small margin. What's "a lot more"?