From a418a180b9eb1c542ab3fc1f3651ce6244965862 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Fri, 28 Aug 2020 00:59:14 +0200 Subject: Some clarifications in text submodules. --- module/text/markup.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'module/text/markup.scm') diff --git a/module/text/markup.scm b/module/text/markup.scm index 7e625725..b74fd169 100644 --- a/module/text/markup.scm +++ b/module/text/markup.scm @@ -7,6 +7,11 @@ :use-module (text flow) :use-module (texinfo string-utils)) +;; Takes an HTML-like sxml coded tree, and produces a string with +;; appropriate spacing and ANSI-escapes for different tags. +(define-public (sxml->ansi-text tree) + ((parse-tree ontree onleaf) tree)) + (define (esc . effect) (format #f "\x1b[~am" @@ -117,5 +122,3 @@ [any (leaf-callback any)])) -(define-public (sxml->ansi-text tree) - ((parse-tree ontree onleaf) tree)) -- cgit v1.2.3