Zola: Investigate switching to comrak for markdown rendering

Created on 2 Nov 2018  路  7Comments  路  Source: getzola/zola

https://github.com/kivikakk/comrak

For normal size articles, it is roughly the same speed as pulldown-cmark but you get an AST so it should be easier. It also supports some GitHub markdown enhancements, which is quite nice.
comrak passes all the tests in the CommonMark spec and is actively maintained as opposed to pulldown-cmark.

help wanted

Most helpful comment

@Keats Cool, that's motivating. As background, I made more than two attempts to try to find someone to take over the new_algo branch development, but those didn't pan out. I'm taking another look now and I'm feeling like doing it myself (often, just writing code is more relaxing than coordinating volunteers).

If people are interested in discussing in more detail, I'll create a channel on the xi zulip. Otherwise, they can watch progress on the new_algo branch.

All 7 comments

If anyone is interested in contributing, all the code lives in the next branch in components/rendering/src/markdown.rs. There should be tests covering all the markdown rendering aspects so it should be fairly straightforward.

I don't have time to contribute right now, but I'd very strongly be in favor.

I started to give a look but I'm not convinced by the maintenance argument:

Is there any other benefits from switching to comrak? Maybe making some feature implementation easier?

The main benefit is having a markdown parser that follows the spec without errors. Right now there are some issues with pulldown-cmark in some markdown cases that can't really be worked around.
Another bonus of comrak is the github extensions like checklists

I think it's fine to use comrak if it meets your needs. That said, pulldown-cmark will get 100% cmark compatibility before too long, it's obviously very important. I can't promise when though.

If possible I would prefer avoid changing code that already works with pulldown-cmark. I was under the impression that pulldown-cmark wasn't really actively developed anymore so I stand corrected

@Keats Cool, that's motivating. As background, I made more than two attempts to try to find someone to take over the new_algo branch development, but those didn't pan out. I'm taking another look now and I'm feeling like doing it myself (often, just writing code is more relaxing than coordinating volunteers).

If people are interested in discussing in more detail, I'll create a channel on the xi zulip. Otherwise, they can watch progress on the new_algo branch.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

svenstaro picture svenstaro  路  5Comments

florianb picture florianb  路  5Comments

veldsla picture veldsla  路  5Comments

anthonychwong picture anthonychwong  路  4Comments

porglezomp picture porglezomp  路  7Comments