|
|
@ -144,6 +144,17 @@ module.exports = function reference(state, startLine, _endLine, silent) { |
|
|
|
// skip trailing spaces until the rest of the line
|
|
|
|
while (pos < max && str.charCodeAt(pos) === 0x20/* space */) { pos++; } |
|
|
|
|
|
|
|
if (pos < max && str.charCodeAt(pos) !== 0x0A) { |
|
|
|
if (title) { |
|
|
|
// garbage at the end of the line after title,
|
|
|
|
// but it could still be a valid reference if we roll back
|
|
|
|
title = ''; |
|
|
|
pos = destEndPos; |
|
|
|
lines = destEndLineNo; |
|
|
|
while (pos < max && str.charCodeAt(pos) === 0x20/* space */) { pos++; } |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (pos < max && str.charCodeAt(pos) !== 0x0A) { |
|
|
|
// garbage at the end of the line
|
|
|
|
return false; |
|
|
|