diff options
author | Ludovic Courtès | 2008-12-07 20:55:13 +0100 |
---|---|---|
committer | Ludovic Courtès | 2008-12-07 20:55:13 +0100 |
commit | e4ec47af3937f386424267fcad84361ad78d819f (patch) | |
tree | eab3b5bc6f0052065cd9ef21e4b65c924a813838 /src/guile | |
parent | d1dc7794a28366ef7110a68feba2baeac0363573 (diff) | |
download | skribilo-e4ec47af3937f386424267fcad84361ad78d819f.tar.gz skribilo-e4ec47af3937f386424267fcad84361ad78d819f.tar.lz skribilo-e4ec47af3937f386424267fcad84361ad78d819f.zip |
info: Justify all strings that are output.
* src/guile/skribilo/engine/info.scm (info-engine): Add a `:filter'
closure.
(block-title): Use `ast->string' when TITLE is not a string to avoid
side effects with `justify'.
Diffstat (limited to 'src/guile')
-rw-r--r-- | src/guile/skribilo/engine/info.scm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/guile/skribilo/engine/info.scm b/src/guile/skribilo/engine/info.scm index 19168f2..264b491 100644 --- a/src/guile/skribilo/engine/info.scm +++ b/src/guile/skribilo/engine/info.scm @@ -28,7 +28,8 @@ :use-module (skribilo package base) :autoload (skribilo parameters) (*destination-file*) :autoload (skribilo output) (output) - :autoload (skribilo utils justify) (make-justifier with-justification) + :autoload (skribilo utils justify) (output-justified make-justifier + with-justification) :autoload (skribilo utils text-table) (table->ascii) :use-module (srfi srfi-8) :use-module (srfi srfi-13) @@ -43,7 +44,11 @@ :version 1.0 :format "info" :delegate (find-engine 'base) - :filter #f ;; XXX: Do we need something? + :filter (lambda (str) + ;; Justify all the strings that are to be output. + (with-output-to-string + (lambda () + (output-justified str)))) :custom '())) ;*---------------------------------------------------------------------*/ @@ -142,8 +147,7 @@ (let ((title (if title title subtitle))) (if (string? title) title - (with-output-to-string - (lambda () (output title e))))))) + (ast->string title))))) ;*---------------------------------------------------------------------*/ ;* info ::%document ... */ |