literate: convert org/box-renderable.org from doc-only to tangle source
Now tangles to box.lisp + text.lisp + box-tests.lisp. Deleted hand-written originals and regenerated — GREEN.
This commit is contained in:
@@ -61,8 +61,7 @@
|
||||
do (draw-text backend x (+ y row) line fg bg)))))))
|
||||
|
||||
(defun word-wrap (text max-width)
|
||||
"Split TEXT into lines, each <= MAX-WIDTH chars.
|
||||
Breaks at word boundaries. Words exceeding MAX-WIDTH are hard-broken."
|
||||
"Split TEXT into lines, each <= MAX-WIDTH chars."
|
||||
(if (or (zerop max-width) (zerop (length text)))
|
||||
(list "")
|
||||
(let ((words (split-string text)) (lines nil) (current nil) (current-len 0))
|
||||
|
||||
Reference in New Issue
Block a user