Link for my markdown-parse repository: MyRepo
Link to the markdown-parse repository we reviewed: ReviewedRepo
Commonmark:
`google.com
, google.com
, and ucsd.edu
become valid links
My implementation:
Code in MarkdownParseTest.java:
Corresponding output:
This test failed and you can see that url.com
was part of the actual output, but it was not part of the expected output because it should not have been included.
The implementation we reviewed:
Code in MarkdownParseTest.java:
(Same as code in my implementation.)
Corresponding output:
This test failed and you can see that url.com
was part of the actual output, but it was not part of the expected output because it should not have been included.
Commonmark:
a.com
, a.com((
, and example.com
become valid links
My implementation:
Code in MarkdownParseTest.java:
Corresponding output:
This test didn't fail, so it doesn't show up in the list of failed tests. There were 2 failures and the test for snippet 2 was not one of them.
The implementation we reviewed:
Code in MarkdownParseTest.java:
(Same as code in my implementation.)
Corresponding output:
This test didn't fail, so it doesn't show up in the list of failed tests. There were 4 failures and the test for snippet 2 was not one of them.
Commonmark:
only https://ucsd-cse15l-wi22.github.io/
becomes a valid link
My implementation:
Code in MarkdownParseTest.java:
Corresponding output:
This test failed and you can see that the expected output was https://ucsd-cse15l-w22.github.io/
, but the actual output was
https://www.twitter.com
,
https://ucsd-cse15l-w22.github.io/
, github.com
And there's still some more text after that.
[this link doesn't have a closing parenthesis for a while](https://cse.ucsd.edu/
The implementation we reviewed:
Code in MarkdownParseTest.java:
(Same as code in my implementation.)
Corresponding output:
This test failed and you can see that the expected output was https://ucsd-cse15l-w22.github.io/
, but the actual output was nothing.
1. Snippet 1:
It seems that MarkdownParse works for cases that use inline code with backticks. The problem was that it also included url.com
, which was not part of the expected output (as seen on the CommonMark Demo Site). "[a link
" is inline code because of the backticks (`[a link`]) and breaks the link. So, Markdown Parse should not include url.com
as a valid link. To fix this, you could use an if statement that checks for an "open" and "close" backticks in a link and their placement in that link. Backticks inside brackets/parentheses produce links that work and "close" backticks after the closing parenthesis also produce a link that works.
2. Snippet 2:
Both my implementation and the review code's implementation didn't fail for the snippet 2 test.
3. Snippet 3:
My implementation outputed a lot more than what was expected, which was just one link. According to the CommonMark Demo Site, https://www.twitter.com
and https://cse.ucsd.edu/
do not create valid links. My implementation included these, but also included
github.com
And there's still some more text after that.
[this link doesn't have a closing parenthesis for a while](https://cse.ucsd.edu/
because all of this text is between open and close parentheses. To fix this problem, you need to use if statements to check for line breaks and if a new link starts before another ends.