Skip Navigation

Mapping-file approach for multi-markup reader?

I want to write a reader for multiple lightweight markup languages. It must only support pretty basic "rich text" features (bold, indent, lists, such things), complicated formatting and not-matching tags will be entirely ignored.

I don't want to use a intermediate markup like pandoc does, since it should not convert but only display.Which is why i thought of using a "mapping file" for each language. Guess it should support hierarchies, since formats like Markdown require context (prior line has this and next line that), so it will likely be in YAML/TOML/JSON.

Is this sufficient, or is there any better approach for simple addition of markup languages?Or other projects doing similiar, i could learn from?

The context is a simple mbox/eml reader for a start (html and markdown), and the experience/ideas will be used in a bigger project later, with more language support.

Comments

2