exercism / docs

Exercism's docs. View them at Exercism's website, not on GitHub.
https://exercism.org/docs
44 stars 92 forks source link

markdown: explicitly say whether GFM is supported #361

Open ee7 opened 2 years ago

ee7 commented 2 years ago

I believe that the website uses commonmarker (see here), which is the wrapper for libcmark-gfm. And therefore the website supports rendering a markdown file that uses GitHub Flavored Markdown features.

However, the Exercism Markdown spec does not state whether a Markdown file can use GFM features. We should state that explicitly, so that e.g. a track knows whether they can use a tables, task list items, or strikethroughs.

Configlet will soon learn to parse and render Markdown, but this will at least initially only support the CommonMark 0.30 spec (not GFM). If necessary, it should be straightforward for it to support GFM (by wrapping libcmark-gfm, rather than libcmark).

Somewhat related: GitHub is thinking about adding a new admonition syntax. See https://talk.commonmark.org/t/4173

But even if the GFM spec is changed, I would suggest that we keep the current admonition syntax:

All blocks are written using 4 tildes, in the form of:

~~~~exercism/note 
Content goes here 

You can include code: 
```ruby 
str = "Hello, World" 

```` 

(Note: You may also use backticks or other levels of tildes in exceptional circumstances) 
ErikSchierboom commented 2 years ago

FYI The additional rendering options that we support are footnotes and allowing unsafe HTML: https://github.com/gjtorikian/commonmarker#render-options

ee7 commented 2 years ago

Thanks. Do we support tables and strikethrough too?

What's the rationale behind using UNSAFE? And how does it interact with tagfilter?


To others, links about footnotes:

ErikSchierboom commented 2 years ago

Do we support tables and strikethrough too?

Yes.

What's the rationale behind using UNSAFE? And how does it interact with tagfilter?

@iHiD?

iHiD commented 2 years ago

No idea. I guess we trust maintainers' code and allow them to do whatever?

ErikSchierboom commented 2 years ago

🤷

ee7 commented 2 years ago

I'd probably lean towards: