diff options
| author | ruki <waruqi@gmail.com> | 2018-11-08 00:43:05 +0800 |
|---|---|---|
| committer | ruki <waruqi@gmail.com> | 2018-11-07 22:18:30 +0800 |
| commit | 89e95b3f143682ed9a006991bacf45c9dcba4818 (patch) | |
| tree | 4f44cf41b828577d583890bdd5a1c31e8491a6ba /node_modules/markdown-it/lib/rules_inline/balance_pairs.js | |
| parent | aa7f0199255277949790b41c56e8ec97dd4f0da4 (diff) | |
| download | xmake-docs-vuepress.tar.gz xmake-docs-vuepress.zip | |
remove node_modulesvuepress
Diffstat (limited to 'node_modules/markdown-it/lib/rules_inline/balance_pairs.js')
| -rw-r--r-- | node_modules/markdown-it/lib/rules_inline/balance_pairs.js | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/node_modules/markdown-it/lib/rules_inline/balance_pairs.js b/node_modules/markdown-it/lib/rules_inline/balance_pairs.js deleted file mode 100644 index f2a52072..00000000 --- a/node_modules/markdown-it/lib/rules_inline/balance_pairs.js +++ /dev/null @@ -1,44 +0,0 @@ -// For each opening emphasis-like marker find a matching closing one -// -'use strict'; - - -module.exports = function link_pairs(state) { - var i, j, lastDelim, currDelim, - delimiters = state.delimiters, - max = state.delimiters.length; - - for (i = 0; i < max; i++) { - lastDelim = delimiters[i]; - - if (!lastDelim.close) { continue; } - - j = i - lastDelim.jump - 1; - - while (j >= 0) { - currDelim = delimiters[j]; - - if (currDelim.open && - currDelim.marker === lastDelim.marker && - currDelim.end < 0 && - currDelim.level === lastDelim.level) { - - // typeofs are for backward compatibility with plugins - var odd_match = (currDelim.close || lastDelim.open) && - typeof currDelim.length !== 'undefined' && - typeof lastDelim.length !== 'undefined' && - (currDelim.length + lastDelim.length) % 3 === 0; - - if (!odd_match) { - lastDelim.jump = i - j; - lastDelim.open = false; - currDelim.end = i; - currDelim.jump = 0; - break; - } - } - - j -= currDelim.jump + 1; - } - } -}; |
