Handbook
Glossary
$markup-example ( element -- )
Factor handbook
»
Developer tools
»
Help system
»
Writing documentation
»
Element types
»
Block elements
Prev:
$list ( element -- )
Next:
$references ( element -- )
Vocabulary
help
.
markup
Inputs
element
a markup element
Outputs
None
Word description
Prints a clickable example showing the prettyprinted source text of
element
followed by rendered output. The example becomes clickable if the output stream supports it.
Examples
{ $markup-example { $emphasis "Hi" } } print-element
{ $emphasis "Hi" } print-element
Hi
Definition
USING:
arrays
kernel
prettyprint
sequences
;
IN:
help.markup
:
$markup-example
( element -- )
first
dup
unparse
" print-element"
append
1array
$code
print-element
;