|
@ -18,6 +18,7 @@ module.exports = function links(state, silent) { |
|
|
ref, |
|
|
ref, |
|
|
code, |
|
|
code, |
|
|
isImage = false, |
|
|
isImage = false, |
|
|
|
|
|
oldPos = state.pos, |
|
|
max = state.posMax, |
|
|
max = state.posMax, |
|
|
start = state.pos, |
|
|
start = state.pos, |
|
|
marker = state.src.charCodeAt(start); |
|
|
marker = state.src.charCodeAt(start); |
|
@ -86,7 +87,7 @@ module.exports = function links(state, silent) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (pos >= max || state.src.charCodeAt(pos) !== 0x29/* ) */) { |
|
|
if (pos >= max || state.src.charCodeAt(pos) !== 0x29/* ) */) { |
|
|
state.pos = labelStart - 1; |
|
|
state.pos = oldPos; |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
pos++; |
|
|
pos++; |
|
@ -121,7 +122,7 @@ module.exports = function links(state, silent) { |
|
|
|
|
|
|
|
|
ref = state.env.references[normalizeReference(label)]; |
|
|
ref = state.env.references[normalizeReference(label)]; |
|
|
if (!ref) { |
|
|
if (!ref) { |
|
|
state.pos = labelStart - 1; |
|
|
state.pos = oldPos; |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
href = ref.href; |
|
|
href = ref.href; |
|
|