jupyter / jupyter_markdown

Documentation and tests related to Jupyter's Markdown syntax
BSD 3-Clause "New" or "Revised" License
8 stars 10 forks source link

Test against GitHub Flavored Markdown (GFM) spec #10

Open mpacer opened 6 years ago

mpacer commented 6 years ago

Github also has a spec for their markdown rendering: https://github.github.com/gfm/

More details: https://githubengineering.com/a-formal-spec-for-github-markdown/

They do not currently support a web endpoint we can use to grab versions of the spec.json.

So we would need to address that directly.

One solution would require creating it locally and storing it with every released version as part of this library (undesirable).

Alternatively, we could do a bit of GitHub site scraping and pull down spec_tests.py, cmark.py, & spec.txt & run it with a subprocess call. Slightly better but then we won't be able to get the latest released version (or know about our behaviour on multiple versions (which is ideal).

jzf2101 commented 6 years ago

@mpacer do you think this issue would be sprint friendly?

mpacer commented 6 years ago

Not necessarily. Especially since the GitHub markdown file is not accessible at a web-endpoint (which I was going to pursue once we had a more complete testing workflow just for commonmark (which does have such a web-endpoint).

Switching the current code to pull the spec down would be a sprint friendly issue (just changes out a few lines of code) if it's not already an issue I can make it one.

rgbkrk commented 6 years ago

/cc @smashwilson 😅❤️

mpacer commented 6 years ago

@rgbkrk @smashwilson Should it be an issue on https://github.com/github/cmark/ ? There's no github analog to https://github.com/commonmark/CommonMark or I would have opened the issue already.

rgbkrk commented 6 years ago

Oh hey I didn't even realize they had a fork! I see the links you made now.

rgbkrk commented 6 years ago

Consdering it's a real git repository with tags and all, it seems like you'd be able to pin to their tags and work from it.

mpacer commented 6 years ago

That would require pulling in the files (3 or 4 of them) and then generating the json version of the spec rather than being able to "just" download it.

It's possible, but this is also something that is just generally useful to have available at a web endpoint.

See https://github.com/commonmark/CommonMark/issues/482 for the other case.