tags
-//
-'use strict';
-
-
-var arrayReplaceAt = require('../common/utils').arrayReplaceAt;
-
-
-var PUNCT_CHARS = ' \n()[]\'".,!?-';
-
-
-// from Google closure library
-// http://closure-library.googlecode.com/git-history/docs/local_closure_goog_string_string.js.source.html#line1021
-function regEscape(s) {
- return s.replace(/([-()\[\]{}+?*.$\^|,:#= 0; i--) {
- token = tokens[i];
- if (token.type !== 'text') { continue; }
-
- pos = 0;
- text = token.content;
- reg.lastIndex = 0;
- level = token.level;
- nodes = [];
-
- while ((m = reg.exec(text))) {
- if (reg.lastIndex > pos) {
- nodes.push({
- type: 'text',
- content: text.slice(pos, m.index + m[1].length),
- level: level
- });
- }
-
- nodes.push({
- type: 'abbr_open',
- title: state.env.abbreviations[':' + m[2]],
- level: level++
- });
- nodes.push({
- type: 'text',
- content: m[2],
- level: level
- });
- nodes.push({
- type: 'abbr_close',
- level: --level
- });
- pos = reg.lastIndex - m[3].length;
- }
-
- if (!nodes.length) { continue; }
-
- if (pos < text.length) {
- nodes.push({
- type: 'text',
- content: text.slice(pos),
- level: level
- });
- }
-
- // replace current node
- blockTokens[j].children = tokens = arrayReplaceAt(tokens, i, nodes);
- }
- }
-};
diff --git a/test/fixtures/markdown-it/abbr.txt b/test/fixtures/markdown-it/abbr.txt
deleted file mode 100644
index 009ebc3..0000000
--- a/test/fixtures/markdown-it/abbr.txt
+++ /dev/null
@@ -1,81 +0,0 @@
-
-An example from php markdown readme:
-
-.
-*[HTML]: Hyper Text Markup Language
-*[W3C]: World Wide Web Consortium
-The HTML specification
-is maintained by the W3C.
-.
-The HTML specification
-is maintained by the W3C.
-.
-
-They can contain arbitrary markup (see pandoc implementation):
-
-.
-*[`\]:`]: foo
-\`]:\`
-.
-`]:`
-.
-
-No empty abbreviations:
-
-.
-*[foo]:
-foo
-.
-*[foo]:
-foo
-.
-
-Intersecting abbreviations (first should match):
-
-.
-*[Bar Foo]: 123
-*[Foo Bar]: 456
-
-Foo Bar Foo
-
-Bar Foo Bar
-.
-Foo Bar Foo
-Bar Foo Bar
-.
-
-Don't bother with nested abbreviations (yet?):
-
-.
-*[JS]: javascript
-*[HTTP]: hyper text blah blah
-*[JS HTTP]: is awesome
-JS HTTP is a collection of low-level javascript HTTP-related modules
-.
-JS HTTP is a collection of low-level javascript HTTP-related modules
-.
-
-Mixing up abbreviations and references:
-
-.
-*[foo]: 123
-[bar]: 456
-*[baz]: 789
-[quux]: 012
-and a paragraph continuation
-
-foo [bar] baz [quux]
-.
-and a paragraph continuation
-foo bar baz quux
-.
-
-Don't match the middle of the string:
-
-.
-*[foo]: blah
-*[bar]: blah
-foobar
-.
-foobar
-.
diff --git a/test/fixtures/markdown-it/proto.txt b/test/fixtures/markdown-it/proto.txt
index cad943a..cbefa8c 100644
--- a/test/fixtures/markdown-it/proto.txt
+++ b/test/fixtures/markdown-it/proto.txt
@@ -22,14 +22,6 @@
.
-.
-*[__proto__]: blah
-
-__proto__ \_\_proto\_\_
-.
-proto __proto__
-.
-
.
[hasOwnProperty]
@@ -52,11 +44,3 @@ __proto__ \_\_proto\_\_
.
-
-.
-*[hasOwnProperty]: blah
-
-hasOwnProperty
-.
-hasOwnProperty
-.