Files differing in content were found using a slighlty modified version of the shell script. In short, an echo statment was added to echo the name of the file before the output of the parser. This way, a name of a file would preceed each output, and highlighted differences are easily associated with a given file. Vimdiff was used to actually examine the differences. The shell script can be seen below:
And an example of the vimdiff output can be seen here:
One of the tests that failed
The first that failed is seen in the image below, as the only line highlighed in pink:
The link to this test can be found here. The provided implementation is correct, as this should not produce a valid link. This can be seen when the file text is inputted into the commonmark site:
As it can be seen, this should produce no links.
A code change that would have to done is code to recognize HTML tags and how to process them, as well as what they mean for links. A code change could possibly be excluding anything that is directly adjacent to <>. Additionally, other implementations may have to be added depending on how HTML tags affect text.
Another difference between the 2 outputs can be seen below:
In this case, both my program and the provided program produced wrong results. While mine incorrectly tagged foo as a link, the other program did not tag [not a link] as a link, which it should be. This can be seen in the CommonMark output, which is provided below:
Here we can see that the only link that is valid is “not a link”. The link to this file can be found here. The bug in the code is again that the program is not correctly recognizing HTML tags, as markdown does recognize htem and treats them differently. Therefore it is behaving in odd ways, where in my case links are still recognized while they shouldn’t be, and in the other programs case links aren’t being recognized, even though in some cases they sould be recognized. This bug is distinct from the other one, as in the previous one the other program was correct. However this link proceeds an HTML tag, and therefore would require a different code change to add this edge case.