|
|
@ -95,6 +95,9 @@ function links(state) { |
|
|
|
// Link reference
|
|
|
|
//
|
|
|
|
|
|
|
|
// do not allow nested reference links
|
|
|
|
if (state.linkLevel > 0) { return false; } |
|
|
|
|
|
|
|
// [foo] [bar]
|
|
|
|
// ^^ optional whitespace (can include newlines)
|
|
|
|
for (; pos < max; pos++) { |
|
|
@ -147,7 +150,9 @@ function links(state) { |
|
|
|
title: title, |
|
|
|
level: state.level++ |
|
|
|
}); |
|
|
|
state.linkLevel++; |
|
|
|
state.parser.tokenize(state); |
|
|
|
state.linkLevel--; |
|
|
|
state.push({ type: 'link_close', level: --state.level }); |
|
|
|
} |
|
|
|
|
|
|
|