A home made artisanal markdown parser.
This parses a very small subset of markdown. It can generate formatted text in a console, using ANSI escape sequences.
ruby markdown_parser.rb < example.md
The project is split into 4 components:
- tokenizer.rb - splits text into a sequence of tokens
- parser.rb - builds an abstract syntax tree (AST) from the tokens
- generator.rb - generates formatted text from the AST (using the visitor pattern)
- markdown_parser.rb - a simple command line interface
MIT