|
@ -149,11 +149,16 @@ module.exports = function reference(state, startLine, _endLine, silent) { |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
label = normalizeReference(str.slice(1, labelEnd)); |
|
|
|
|
|
if (!label) { |
|
|
|
|
|
// CommonMark 0.20 disallows empty labels
|
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// Reference can not terminate anything. This check is for safety only.
|
|
|
// Reference can not terminate anything. This check is for safety only.
|
|
|
/*istanbul ignore if*/ |
|
|
/*istanbul ignore if*/ |
|
|
if (silent) { return true; } |
|
|
if (silent) { return true; } |
|
|
|
|
|
|
|
|
label = normalizeReference(str.slice(1, labelEnd)); |
|
|
|
|
|
if (typeof state.env.references === 'undefined') { |
|
|
if (typeof state.env.references === 'undefined') { |
|
|
state.env.references = {}; |
|
|
state.env.references = {}; |
|
|
} |
|
|
} |
|
|