rust-lang / mdBook

Create book from markdown files. Like Gitbook but implemented in Rust
https://rust-lang.github.io/mdBook/
Mozilla Public License 2.0
18.35k stars 1.65k forks source link

Does mdBook support autolink of GFM (GitHub Flavored Markdown) mode ? #1114

Open lvii opened 4 years ago

lvii commented 4 years ago

Hi

I have searched the document, it seemed that there were no any configurations about GFM (GitHub Flavored Markdown) mode support. Does mdBook support GitHub Flavored Markdown mode ?

Thanks.

ehuss commented 4 years ago

mdBook supports Commonmark plus GFM tables, GFM task lists, GFM strikethrough, and footnotes.

lvii commented 4 years ago

@ehuss Thanks.

Raw http link like https://github.com/rust-lang/mdBook/ in markdown could NOT auto convert to html link. it must change to <https://github.com/rust-lang/mdBook/> markdown format.

I hope that mdBook would support GFM links.

ehuss commented 4 years ago

You may want to follow up on pulldown-cmark which is the markdown rendering engine. The direct link for the extension is https://github.github.com/gfm/#autolinks-extension-

lvii commented 4 years ago

@ehuss Could mdbook support changing markdown rendering engine like pulldown-cmark you just mentioned?

ehuss commented 4 years ago

I don't understand the question. If you're asking about using a different rendering engine, I'd prefer not to.

matklad commented 2 years ago

From what I understand, currently pulldown-cmark recommends this feature to be implemented by the end-user. There's a moderately complicated copy-pastable snippet for that here:

https://github.com/raphlinus/pulldown-cmark/issues/494#issuecomment-723568392

I would appreciate if mdBook supported this extension (maybe via some opt-in in config). One of the strengths of mdBook is that is just super-charges markdown docs on github. So folks generally expect GFM, and auto-links in particular seem to be the most surprising missing thing.