Browse Source

Remove stateInline.labelUnmatchedScopes

looks like a dead code
pull/41/head
Alex Kocharin 10 years ago
parent
commit
4ce003cb82
  1. 8
      lib/helpers/parse_link_label.js
  2. 5
      lib/rules_inline/state_inline.js

8
lib/helpers/parse_link_label.js

@ -11,11 +11,6 @@ module.exports = function parseLinkLabel(state, start, disableNested) {
max = state.posMax, max = state.posMax,
oldPos = state.pos; oldPos = state.pos;
if (state.labelUnmatchedScopes) {
state.labelUnmatchedScopes--;
return -1;
}
state.pos = start + 1; state.pos = start + 1;
level = 1; level = 1;
@ -44,9 +39,6 @@ module.exports = function parseLinkLabel(state, start, disableNested) {
if (found) { if (found) {
labelEnd = state.pos; labelEnd = state.pos;
state.labelUnmatchedScopes = 0;
} else {
state.labelUnmatchedScopes = level - 1;
} }
// restore old state // restore old state

5
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 this.cache = []; // Stores { start: end } pairs. Useful for backtrack
// optimization of pairs parse (emphasis, strikes). // optimization of pairs parse (emphasis, strikes).
// Link parser state vars
this.labelUnmatchedScopes = 0; // Track unpaired `[` for link labels
// (backtrack optimization)
} }

Loading…
Cancel
Save