Age | Commit message (Collapse) | Author |
|
|
|
This allows me to build ninenines.eu using Asciideck and
while the results are not perfect yet things are looking
pretty, pretty good. Adding source-highlight support,
showing images and fixing a few minor issues should bring
me to the point where I can drop Asciidoc.
|
|
The new code is much more readable and easier to extend. I took
inspiration from Haskell's Parsec project which seems to only
write the happy-path and applied the idea to Erlang's exceptions.
When the parser tries to parse, say, a list, and crashes, it
tries with a table next, and so on until something matches.
Normal paragraphs always match so there can be no parsing
failures.
The parser now has a number of passes: first the block parser,
then lists and tables passes to build a proper tree out of
them and finally an inline pass to apply inline formatting.
The resulting AST can then be modified at will and passed on
to translator modules which output a different format.
The man page translator was also rewritten and has been tested
against both Cowboy and Gun. Numerous issues were fixed as a
result of this rewrite.
|
|
|
|
Solution is a hack for now, unfortunately.
|
|
|
|
|
|
|
|
|
|
|
|
Including support for lists continuations.
|
|
|
|
|
|
|
|
|
|
Also opened the way to making configurable quoted text elements,
like the original Asciidoc allows. We could potentially end up
allowing users to define different types of quotes producing
custom AST.
|
|
This is still very much in a proof of concept state, though
the project should be in a good enough state that future
additions are relatively painless.
Text formatting nodes are not using the proper form in the
AST at the moment. They should not be relied upon just yet.
|