help.markup: make $example render slightly nicer
parent
a64d6e27ec
commit
da7cd4186a
|
@ -129,8 +129,8 @@ ALIAS: $slot $snippet
|
||||||
"Examples" $heading print-element ;
|
"Examples" $heading print-element ;
|
||||||
|
|
||||||
: $example ( element -- )
|
: $example ( element -- )
|
||||||
1 cut* swap "\n" join dup <input> [
|
1 cut* [ "\n" join ] bi@ over <input> [
|
||||||
input-style get format nl print-element
|
[ print ] [ output-style get format ] bi*
|
||||||
] ($code) ;
|
] ($code) ;
|
||||||
|
|
||||||
: $unchecked-example ( element -- )
|
: $unchecked-example ( element -- )
|
||||||
|
|
|
@ -80,8 +80,11 @@ H{
|
||||||
{ wrap-margin f }
|
{ wrap-margin f }
|
||||||
} code-style set-global
|
} code-style set-global
|
||||||
|
|
||||||
SYMBOL: input-style
|
SYMBOL: output-style
|
||||||
H{ { font-style bold } } input-style set-global
|
H{
|
||||||
|
{ font-style bold }
|
||||||
|
{ foreground COLOR: dark-red }
|
||||||
|
} output-style set-global
|
||||||
|
|
||||||
SYMBOL: url-style
|
SYMBOL: url-style
|
||||||
H{
|
H{
|
||||||
|
|
Loading…
Reference in New Issue