From da7cd4186ab0a9e70709fdaa5514d5c4d647b24a Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Thu, 18 Feb 2010 01:18:48 +1300 Subject: [PATCH] help.markup: make $example render slightly nicer --- basis/help/markup/markup.factor | 4 ++-- basis/help/stylesheet/stylesheet.factor | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/basis/help/markup/markup.factor b/basis/help/markup/markup.factor index 75e6538243..f951f30b2f 100644 --- a/basis/help/markup/markup.factor +++ b/basis/help/markup/markup.factor @@ -129,8 +129,8 @@ ALIAS: $slot $snippet "Examples" $heading print-element ; : $example ( element -- ) - 1 cut* swap "\n" join dup [ - input-style get format nl print-element + 1 cut* [ "\n" join ] bi@ over [ + [ print ] [ output-style get format ] bi* ] ($code) ; : $unchecked-example ( element -- ) diff --git a/basis/help/stylesheet/stylesheet.factor b/basis/help/stylesheet/stylesheet.factor index 8a119823cc..d5b783fef8 100644 --- a/basis/help/stylesheet/stylesheet.factor +++ b/basis/help/stylesheet/stylesheet.factor @@ -80,8 +80,11 @@ H{ { wrap-margin f } } code-style set-global -SYMBOL: input-style -H{ { font-style bold } } input-style set-global +SYMBOL: output-style +H{ + { font-style bold } + { foreground COLOR: dark-red } +} output-style set-global SYMBOL: url-style H{