examples: avoid generating an empty nested table for empty output
For something like #lang scribble/manual @(require scribble/eval) @interaction[(define x 2) x] the `interaction` form generated an empty nested table for the zero results from `define`. When rendering via Latex, that empty table could create vertical whitespace. Produce zero lines in the enclosing table, instead.
This commit is contained in:
parent
aca15dcc85
commit
5b37a3ac72
|
@ -99,13 +99,15 @@
|
|||
[(eof-object? v)
|
||||
(let* ([line-accum (add-string string-accum line-accum)]
|
||||
[flow-accum (add-line line-accum flow-accum)])
|
||||
(if (null? flow-accum)
|
||||
null
|
||||
(list
|
||||
(list.flow.list
|
||||
(if (= 1 (length flow-accum))
|
||||
(car flow-accum)
|
||||
(make-table
|
||||
#f
|
||||
(map list.flow.list (reverse flow-accum)))))))]
|
||||
(map list.flow.list (reverse flow-accum))))))))]
|
||||
[(equal? #\newline v)
|
||||
(loop #f #f (add-line (add-string string-accum line-accum)
|
||||
flow-accum))]
|
||||
|
|
Loading…
Reference in New Issue
Block a user