Actmd: a parser for active markdown

For some time I have been trying to build a parser for Markdown that gives me an AST of the document that I can modify before generating the output. The main goal is to extend the parser so that it reads @… as its own elements, which can then be treated as active code in the output—therefore, it's named ‘active markdown.’ In the end, I want to get a parser for Markdown like Razor is for HTML.

It's really not done! It misses all documentation and the test suite isn't complete and many tests fail. But I've reached a state of ‘works for me’ that let me build Rust code to dynamicly build HTML at runtime. This is a second project I've separated from the parser, because it contains much more dependencies.

Now, I'm looking for some advice what could be improved. One of my top questions is the usage of &impl ParserData vs. &dyn ParserData. Can Rust build better code with generics or is a trait object better? I'm open for any ideas and comments.

I've published the current state of code at https://codeberg.org/jo-so/actmd-dev.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.