module Polebrush: sig
.. end
Polebrush markup language syntax tree
Author(s): Alexander Markov [email protected]
Polebrush syntax tree
Options
type
attr =
| |
Class of string |
| |
Id of string |
| |
Style of string |
| |
Language of string |
type
img_float =
| |
Float_left |
| |
Float_right |
Image float.
type
talign =
| |
Right |
| |
Left |
| |
Center |
| |
Justify |
Text-alignment option.
type
valign =
Vertical alignment.
type
padding = int * int
Left and right padding consistently. Define with ( and ) in block
modifier. (0,0) if padding doesn't set.
type
options = attr list * talign option * padding
Content
Phrases may be presents like HTML tags for text formatting. For
example, **ocaml is __functional__ language** is equivalent for ocaml
is functional language or Bold ([], [CData "ocaml is ";
Italic ([], [CData "functional"]); CData " language"])
type
phrase =
type
line = phrase list
One line of text. It terminates by line break character.
type
element = int * line
One element of a list. It's a line and depth of element,
or just count of asterisk or sharps.
Tables
type
tableoptions = options * valign option
Table specific options. May be applied to a table or to a row.
type
celltype =
In markup symbol _ defines a cell as a table header. Otherwise
it's a regular data cell.
type
cellspan = int option * int option
Colspan and rowspan.
type
celloptions = celltype * tableoptions * cellspan
Cell specific options.
type
cell = celloptions * line list
A cell in row.
type
row = tableoptions * cell list
A row in table.
Blocks
type
block =
Extended blocks parse automaticly so there is no difference for you between normal and extended blocks.
Translation
val string_of_line : line -> string
Translates the line to a simple string which can be used, for example,
in HTML's <title> tag. All markup will be removed.