Skip to content

Latest commit

 

History

History
84 lines (42 loc) · 2.61 KB

lab-report-4-week-8.md

File metadata and controls

84 lines (42 loc) · 2.61 KB

Lab Report 4, Week 8


Link to my repo

Link to repo we reviewed


Code snippets test (Snippet 1) on my repo and other repo


Based on the preview below, we expect "`google.com", "google.com", "ucsd.edu"

Image

Code for test on both mine and other repo:

Image

My implementation fails the test:

Image

Their implementation also fails the test:

Image


Wacky brackets test (Snippet 2) on my repo and other repo


Based on the preview below, we expect "a.com", "a.com(())", "example.com"

Image

Code for test on both mine and other repo:

Image

My implementation fails the test:

Image

Their implementation also fails the test:

Image


Long titles test (Snippet 3) on my repo and other repo


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/"

Image

Code for test on both mine and other repo:

Image

My implementation fails the test.

Image

Their implementation also fails the test:

Image


Questions

  1. 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.

  2. 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.

  3. 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.