Writing Clean Code
Links
- My markdown-parse repository
- The repository we reviewed
Snippet 1
- Expected output using VScode preview:

- Junit test I created for it:

- Corresponding output when running the test:
- My implementation:

- The implementation I reviewed in Week 7:

- Small code change: To check if the code inside the backticks changes the markdown link. This is because backticks can make it so that the code within
[] or () would not generate a link, making the markdown link not work.
Snippet 2
- Expected output using VScode preview:

- Junit test I created for it:

- Corresponding output when running the test:
- My implementation:

- The implementation I reviewed in Week 7:

- Small code change: Check if each type of bracket (parentheses, escaped bracket, bracket) has closing pair within the link’s formatted brackets as if they are closed they won’t affect the markdown links.
Snippet 3
- Expected output using VScode preview:

- Junit test I created for it:

- Corresponding output when running the test:
- My implementation:

- The implementation I reviewed in Week 7:

- Small code change: Check if there are newlines contained with the parentheses / brackets because links only work when all needed parts of the link are next to each other regardless of seperate lines, for example it works when ends of the brackets / parentheses aren’t seperated by newlines as this is a needed part of the link formatting.