File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -884,21 +884,20 @@ var parseReference = function(s, refmap) {
884884 title = this . parseLinkTitle ( ) ;
885885 }
886886 if ( title === null ) {
887- title = "" ;
888887 // rewind before spaces
889888 this . pos = beforetitle ;
890889 }
891890
892891 // make sure we're at line end:
893892 var atLineEnd = true ;
894893 if ( this . match ( reSpaceAtEndOfLine ) === null ) {
895- if ( title === "" ) {
894+ if ( title === null ) {
896895 atLineEnd = false ;
897896 } else {
898897 // the potential title we found is not at the line end,
899898 // but it could still be a legal link reference if we
900899 // discard the title
901- title = "" ;
900+ title = null ;
902901 // rewind before spaces
903902 this . pos = beforetitle ;
904903 // and instead check if the link URL is at the line end
@@ -919,7 +918,7 @@ var parseReference = function(s, refmap) {
919918 }
920919
921920 if ( ! refmap [ normlabel ] ) {
922- refmap [ normlabel ] = { destination : dest , title : title } ;
921+ refmap [ normlabel ] = { destination : dest , title : title === null ? "" : title } ;
923922 }
924923 return this . pos - startpos ;
925924} ;
Original file line number Diff line number Diff line change @@ -484,3 +484,11 @@ x <- 1
484484<p>&para</p>
485485<p>¶</p>
486486````````````````````````````````
487+
488+ #281
489+ ```````````````````````````````` example
490+ [test]:example
491+ ""third [test]
492+ .
493+ <p>""third <a href="example">test</a></p>
494+ ````````````````````````````````
You can’t perform that action at this time.
0 commit comments