I am looking for an open source Markdown parsing library for .NET/Mono (i.e. usable from C# code) (preferably with MIT/BSD license or similar).
I have found various such libraries, but the one issue with all of them is that they all convert the information gathered from Markdown text to a fixed output format, usually HTML.
I am looking for a Markdown parser that does (at least) one of the following:
- fire events for the components of Markdown text (like SAX parsers do for XML)
- let me pull the text components (like
XmlReader
does for XML) - build a data structure (like what DOM would be for XML) that represents the contents of the Markdown text for further programmatical processing
I am looking to achieve this in a non-hacky way, that is, solutions that let the Markdown source be converted to HTML, just to do something with that HTML and convert it back to Markdown-something afterwards, do not sound maintainable enough.