diff --git a/lib/helpers/parse_link_label.js b/lib/helpers/parse_link_label.js index 5435cb0..5a450fd 100644 --- a/lib/helpers/parse_link_label.js +++ b/lib/helpers/parse_link_label.js @@ -11,11 +11,6 @@ module.exports = function parseLinkLabel(state, start, disableNested) { max = state.posMax, oldPos = state.pos; - if (state.labelUnmatchedScopes) { - state.labelUnmatchedScopes--; - return -1; - } - state.pos = start + 1; level = 1; @@ -44,9 +39,6 @@ module.exports = function parseLinkLabel(state, start, disableNested) { if (found) { labelEnd = state.pos; - state.labelUnmatchedScopes = 0; - } else { - state.labelUnmatchedScopes = level - 1; } // restore old state diff --git a/lib/rules_inline/state_inline.js b/lib/rules_inline/state_inline.js index ed75e41..000e71d 100644 --- a/lib/rules_inline/state_inline.js +++ b/lib/rules_inline/state_inline.js @@ -17,11 +17,6 @@ function StateInline(src, md, env, outTokens) { this.cache = []; // Stores { start: end } pairs. Useful for backtrack // optimization of pairs parse (emphasis, strikes). - - // Link parser state vars - - this.labelUnmatchedScopes = 0; // Track unpaired `[` for link labels - // (backtrack optimization) }