help.markup: make $example render slightly nicer

db4
Slava Pestov 2010-02-18 01:18:48 +13:00
parent a64d6e27ec
commit da7cd4186a
2 changed files with 7 additions and 4 deletions

View File

@ -129,8 +129,8 @@ ALIAS: $slot $snippet
"Examples" $heading print-element ;
: $example ( element -- )
1 cut* swap "\n" join dup <input> [
input-style get format nl print-element
1 cut* [ "\n" join ] bi@ over <input> [
[ print ] [ output-style get format ] bi*
] ($code) ;
: $unchecked-example ( element -- )

View File

@ -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{