cse15l-lab-reports

Link to my own markdownparse

Link to the markdownparse I reviewed

My Own Markdownparse Tests

Snippet 1: For snippet 1, by using the preview, the output I expect should be [url.com,`google.com, google.com, ucsd.edu] because on the preview, it shows all four lines of code to be a valid link. test 1

test 1 fail

Snippet 2: Again, by using the preview, I noticed that all three lines of code were able to generate a link. I expect [a.com, <a.com(())>, example.com] because in the first line, (b.com) was actually printed out like a regular line and the other two links were able to be completely generated.

test 2

test 2 fail

Snippet 3:I checked all the links in the preview to see where it directs me to and I was able to confirm what links I should expect. The links I expected was [https://www.twitter.com, https://ucsd-cse15l-w22.github.io/, https://cse.ucsd.edu/]

test3

test3 fail

MarkdownParse I Reviewed Tests

Snippet 1: test 1

test 1 fail

Snippet 2: test 2

test 2 fail

Snippet 3: test3

Snippet 3 actually passed the final test.

Question 1: Do you think there is a small (<10 lines) code change that will make your program work for snippet 1 and all related cases that use inline code with backticks?

Ans 1: I do believe there can be a small code change that will account the inline code with backticks. I think if statement could take care of that issue. I believe the if statement should be something like this: if (nextOpenBracket > 0 && markdown.charAt(nextOpenBracket - 1) == '`' but I am still unsure.

Question 2: Do you think there is a small (<10 lines) code change that will make your program work for snippet 2 and all related cases that nest parentheses, brackets, and escaped brackets?

Ans 2: I am unsure about if the code change can be small since it has to account for multiple things, this might require multiple if statements.

Question 3: Do you think there is a small (<10 lines) code change that will make your program work for snippet 3 and all related cases that have newlines in brackets and parentheses?

Ans 3: I think we could make a small code change for the program to work for snippet 3. However, I am not very sure. I believe some type of if statement that accounts for white spaces such as " " or " ".