|
|
@ -99,9 +99,6 @@ module.exports = function links(state, silent) { |
|
|
|
//
|
|
|
|
if (typeof state.env.references === 'undefined') { return false; } |
|
|
|
|
|
|
|
// do not allow nested reference links
|
|
|
|
if (state.linkLevel > 0) { return false; } |
|
|
|
|
|
|
|
// [foo] [bar]
|
|
|
|
// ^^ optional whitespace (can include newlines)
|
|
|
|
for (; pos < max; pos++) { |
|
|
@ -166,9 +163,7 @@ module.exports = function links(state, silent) { |
|
|
|
title: title, |
|
|
|
level: state.level++ |
|
|
|
}); |
|
|
|
state.linkLevel++; |
|
|
|
state.parser.tokenize(state); |
|
|
|
state.linkLevel--; |
|
|
|
state.push({ type: 'link_close', level: --state.level }); |
|
|
|
} |
|
|
|
} |
|
|
|