Based on the preview below, we expect "`google.com", "google.com", "ucsd.edu"
Code for test on both mine and other repo:
My implementation fails the test:
Their implementation also fails the test:
Based on the preview below, we expect "a.com", "a.com(())", "example.com"
Code for test on both mine and other repo:
My implementation fails the test:
Their implementation also fails the test:
Based on the preview below, we expect "https://www.twitter.com", "https://sites.google.com/eng.ucsd.edu/cse-15l-spring-2022/schedule", "https://cse.ucsd.edu/"
Code for test on both mine and other repo:
My implementation fails the test.
Their implementation also fails the test:
-
I think a small code change I could make to get my implementation to work with backticks is to add a condition when parsing the markdown file that would ignore any backticks. Backticks are not a valid input in the syntax for links, so the parser should leave them out of the link.
-
A code change to make my markdown parser pass the test for the second snippet would be more involved and longer than ten lines. We would have to implement some kind of helper method that will ignore sets of brackets that don't have parentheses next to them and incorporate links that have parentheses next to the brackets.
-
A code change I could make to this test that would not be a short one would be to add a helper method that checks all lines to find the closing parentheses. The parser only looks on the same line for the closed bracket, but it should be checking all of the lines until the end of the file.