ruricolist / spinneret

Common Lisp HTML5 generator
MIT License
369 stars 26 forks source link

Inserted spaces and <pre> #38

Closed dfmorrison closed 4 years ago

dfmorrison commented 4 years ago

I think *suppress-inserted-spaces* t should be in effect by default when emitting a <pre>.

ruricolist commented 4 years ago

Can you give me an example? fill-text isn't called in a <pre>. Or are you nesting other HTML elements inside a <pre>?

dfmorrison commented 4 years ago
(with-html-string (:pre "foo" #\Newline "b" "a" "r")) ⇒
"<pre>foo 
 b a r</pre>"

Note the leading space before the 'b', as well as those between the strings in the second line. But with *suppress-inserted-spaces* t all seems well:

(let ((*suppress-inserted-spaces* t))
  (with-html-string (:pre "foo" #\Newline "b" "a" "r"))) ⇒
"<pre>foo
bar</pre>"