Open mpacer opened 6 years ago
@mpacer do you think this issue would be sprint friendly?
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.
/cc @smashwilson 😅❤️
@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.
Oh hey I didn't even realize they had a fork! I see the links you made now.
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.
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.
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).