cobalt-org / cobalt.rs

Static site generator written in Rust
cobalt-org.github.io/
Apache License 2.0
1.38k stars 102 forks source link

Support for commonmark extensions #345

Closed jcgruenhage closed 3 years ago

jcgruenhage commented 6 years ago

Some useful extensions to commonmark:

The GFM things are already implemented in comrak, which is another rust based markdown parser, which is quite a bit slower than the currently used pulldown-cmark.

epage commented 6 years ago

If I'm not mistaken, we have table and footnote support enabled

I agree about GFM.

As for Math, someone also filed an issue about MathJax (#280).

Maruku feels like someone trying too hard at wanting to write HTML in not-HTML., What is the benefit there?

jcgruenhage commented 6 years ago

It's exactly that, writing HTML in non-HTML. Basically, I'd use this for adding a class to a link. While I can just use regular HTML, it looks out of place compared to regular links.

naturallymitchell commented 5 years ago

The GFM things are already implemented in comrak, which is another rust based markdown parser, which is quite a bit slower than the currently used pulldown-cmark.

Are you thinking of switching parser renderers? https://github.com/cobalt-org/cobalt.rs/blob/dedec02b44fc58268c0487531a7a4c68defcaaf8/Cargo.toml#L34

We're using comrak for web development, and I'm gonna continue developing markdown's spec and a Rust lib, most likely comrak. So it'd be cool coordinate with you guys for any overlapping features you need too. I need to fix a few ambiguities and structured writing limits.

Edit: here's most of what I have planned https://github.com/foundpatterns/contentdb/issues/20

epage commented 5 years ago

While I want GFM features, I have a lot of other higher priority tasks, so I probably won't be putting time towards adding it to either comrak or pulldown. I'd gladly use it if someone gets it implemented though! Maybe it'd even be tempting enough to take the performance hit of switching from pulldown to comrak.

This update on pulldown is promising though:

The pulldown-cmark project has been in a fairly stuck state for a while, largely because I realized the existing codebase had fundamental problems, so decided to start a new branch (new_algo), with the hope of recruiting open source contribution to get to 100% spec compatibility. Recently, Marcus Klaas de Vries has taken this up, and gotten it quite close. I’m hopeful we can merge to master and do a release soonish. Here’s a roadmap for the work.

https://raphlinus.github.io/personal/2019/02/20/more-small-updates.html

artemislena commented 3 years ago

This issue has been open for quite a while… I'm mainly missing the strikethrough thing, which, strangely enough, should work in pulldown-cmark, yet certainly doesn't in Cobalt 0.16.4, at least my own tests with double tildes all failed, giving me raw double tildes in the result. Disallowing raw HTML might actually be undesirable, at least I myself use raw HTML for <ins> and <q>

epage commented 3 years ago

I've gone ahead and created #847 for strike through and task lists. We have #280 for MathJax. If anything else is a priority enough, let's create a dedicated issue for it so we can discuss use case, priority, and how to handle compatibility.