betterscientificsoftware / bssw.io

Better Scientific Software Homepage
https://bssw.io
Other
133 stars 85 forks source link

Test Markdown parser and document surprising behavior #1161

Open bernhold opened 2 years ago

bernhold commented 2 years ago

BSSw uses the https://github.com/vmg/redcarpet Markdown renderer. We are (often painfully) aware of the fact that it behaves differently in some cases than other popular renderers, such as that used by GitHub. Note, however, that these behavioral issues can be compounded by the CSS styling used on BSSw also differing from that used in GitHub and other viewers (especially the default styling in browsers).

It would be useful to find/construct a Markdown test suite, as comprehensive as possible, and compare the renderings we get out of RedCarpet and other tools. GitHub may be considered a primary target due to convenience, but it wouldn't hurt to look at some others too as a cross-check. To distinguish the rendering from the styling, we probably need to extract the HTML and compare that. Once we have a good understanding of the differences in rendering, we can document them (and/or change them to the extent that we can control the renderer behavior).

A second step would be to compare the styling applied by BSSw to the defaults used elsewhere. The BSSw styles were developed by Sandbox and are intentional. But I think they would be open to a discussion of the benefits of using styles closer to defaults in at least some cases.

markcmiller86 commented 1 year ago

Would it be enough to create a sufficiently complex .md file with all features (or all features we care about) and see how it renders and then note departures from expected?

I did find this md test file but breifly scanned it and I don't see, for example, tables or link definitions.

bernhold commented 1 year ago

That certainly seems like the starting point, yes.