Skip to content

Latest commit

 

History

History
31 lines (31 loc) · 1.81 KB

week4-lab-report.md

File metadata and controls

31 lines (31 loc) · 1.81 KB

CSE 15L Lab Report-2

change No.1

line 43 add statement
if(markdown.charAt(nextOpenBracket - 1) != '!')
here This change intends to address the incorrect output caused by a image link. Image link should not be included in the collections of URLs.The if statement prevent any image link to be added to the output.
bug: program would read image links
link to the failure-inducing input:
failure-inducing input-1
symptom: image link included in the output here

change No.2

line 43 changed to: if(nextOpenBracket==0 || markdown.charAt(nextOpenBracket - 1) != '!')
here This change intends to address the StringIndexOutOfBoundsException thrown when running the program after change No.1 with a input file that begins with a closed bracket [
bug: program throws error when the input file starts with a [
link to the failure-inducing input:
failure-inducing input-2
symptom: StringIndexOutOfBoundsException thrown here

change No.3

line 43 changed to: if (nextCloseBracket+1==openParen && (nextOpenBracket ==0 || markdown.charAt(nextOpenBracket - 1) != '!'))
here This change intends to address the incorrect output when input a file that has pairs of close brackets [] and open brackets () that are not adjacent, which means the close and open brackets are not used for link.
bug: program would include content in a pair of open bracket while it's not adjacent to a prior pair of closed bracker, which means the text within is not a URL.
link to the failure-inducing input:
failure-inducing input-3
symptom: ppap isn't a URL but included in the output. here