Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Use https://github.com/karlcow/markdown-testsuite for the tests wherever possible. #69
The Markdown Test Suite https://github.com/karlcow/markdown-testsuite test suite is already huge for the Original markdown spec: note how it allowed this pull request to reduce the existing test file to almost nothing.
Support for extensions has been added recently by yours truly, so there aren't many implemented yet, but additions are now welcome.
@karlcow was really nice and accepted pull requests quickly, so I think it is a good idea to collaborate with him.
If we ever feel that the projects are starting to diverge in their goals we can just fork off, but for now contributing seems like the best option to me.
The only downside of this is that it requires test creators to also code the expected output for the test which is not required for tests here. We could however just accept tests directly here if contributors don't have the time to pull request there separately, and if ever they are implemented there we can remove them from here.
There was an interesting idea for testing which was given to me in the past but I have never come to try it.
Instead of testing raw markup output which might have zillions of syntactic rules for spaces, etc. It might be better to test the rendered DOM.
Once a test markdown file is being converted to HTML, it is possible to create how it is represented in the DOM. This DOM can be more easily compared in between different conversion tools, because HTML5 specification defines now exactly how the serialization of HTML as a DOM should be done.