aboutsummaryrefslogtreecommitdiffstats
path: root/src/asciideck_inline_pass.erl
AgeCommit message (Collapse)Author
2018-06-27Ensure explicit line breaks are at end of lineLoïc Hoguin
2018-06-13Add mailto linksLoïc Hoguin
2018-06-12Add forced line breaksLoïc Hoguin
2018-06-11Many fixes based on reading the HTML renders of Cowboy docsLoïc Hoguin
2018-06-08Rewrite the projectLoïc Hoguin
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.