This document describes the Swim markup format, its goals and its specific design decisions.
Beautiful input syntax and beautiful output renderings
(re)Use the best existing markup syntaxes
Render to many formats
HTML
Plain text
Other common text markups (Markdown, Pod, etc)
Core info model supports most common, useful constructs
Support everything else via pluggable extension syntax
Swim defines an information model for text documents. The 2 main generic components are blocks and phrases. This pretty directly corresponds to the HTML concepts of divs and spans.
The model is roughly expressed by this grammar:
# A document is a set of blocks document: block* # A block is /either/ a set of more blocks /or/ a set of phrases block: block* | phrase* # A phrase is moer or less a sentence fragement phrase: bold | italic | link | … | plain-text
Swim is literally defined by this grammar:
To install Swim, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Swim
CPAN shell
perl -MCPAN -e shell install Swim
For more information on module installation, please visit the detailed CPAN module installation guide.