By Qingyu Zhu
Using vimdiff to show the tests that give different results:

Links to the test-file with different results:
This is the link for the first test-file
This is the link for the second test-file
Actual Outputs: (Above: mine; Below: provided)

-
For this test-file, the provided implementation is correct as it produces the expected output. However, my own implementation gives a wrong output.
-
My own implementation is wrong as it's not capable of identifying and handling nested or escaped parentheses and brackets, and it can only capture and return whatever is between a pair of parentheses.
-
More if-statements with more rigorous conditions that check for nested or escaped parentheses should be added before adding a valid link to the returned list (as screenshot below).
Actual Outputs: (Above: mine; Below: provided)

-
For this test-file, my implementation is correct as it produces the expected output. However, the provided implementation gives a wrong output.
-
The problem with the provided implementation is that it does not take into account the checking of exclamation mark, which, in Markdown, separates photos from valid links.
-
This leads to the bug output since it regards the photo link as a valid link to return.
-
One more if-statement could be added to the program that checks specifically for exclamation marks in front of the outer bracket before adding a link to the returned list (as screenshot below).





