From e4ec47af3937f386424267fcad84361ad78d819f Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 7 Dec 2008 20:55:13 +0100 Subject: 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'. --- src/guile/skribilo/engine/info.scm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/guile/skribilo/engine/info.scm') 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 ... */ -- cgit v1.2.3