diff --git a/.jshintrc b/.jshintrc index bcc0efd..3557d07 100644 --- a/.jshintrc +++ b/.jshintrc @@ -14,7 +14,7 @@ "quotmark": "single", "undef": false, "unused": true, - "strict": true, + "strict": false, "trailing": true, "smarttabs": true, "onevar": true, diff --git a/README.md b/README.md index 1ee2eb2..68ca034 100644 --- a/README.md +++ b/README.md @@ -259,16 +259,8 @@ var defaultOptions = showdown.getDefaultOptions();
some text www.google.com ``` - * **excludeTrailingPunctuationFromURLs**: (boolean) [default false] This option excludes trailing punctuation from autolinking urls. - Punctuation excluded: `. ! ? ( )`. Only applies if **simplifiedAutoLink** option is set to `true`. - - ```md - check this link www.google.com! - ``` - will be parsed as - ```html -
check this link www.google.com!
- ``` + * ~~**excludeTrailingPunctuationFromURLs**: (boolean) [default false] This option excludes trailing punctuation from autolinking urls. + Punctuation excluded: `. ! ? ( )`. Only applies if **simplifiedAutoLink** option is set to `true`.~~ * **literalMidWordUnderscores**: (boolean) [default false] Turning this on will stop showdown from interpreting underscores in the middle of words as `` and `` and instead treat them as literal underscores. diff --git a/TASKS.TODO.md b/TASKS.TODO.md index be4eadb..4934896 100644 --- a/TASKS.TODO.md +++ b/TASKS.TODO.md @@ -22,7 +22,7 @@ This option is weird, hard to maintain and really... makes little sense. -- [ ] **excludeTrailingPunctuationFromURLs** (removal) +- [X] **excludeTrailingPunctuationFromURLs** (removal) This option will be removed and will be the default behavior from now on. @@ -89,16 +89,15 @@ HTML and OTP extensions will be dropped in favor of Listener Extensions. We might even give them a new name ## Subparsers -- [ ] **Anchors**: Revamp the anchors subparser so it calls strikethrough, bold, italic and underline directly -- [ ] **autoLinks**: Fix some lingering bugs and issues with autolinks - +- [X] **Anchors**: Revamp the anchors subparser so it calls strikethrough, bold, italic and underline directly +- [X] **autoLinks**: Fix some lingering bugs and issues with autolinks ## Priority Bugs -- [ ] **#355**: *simplifiedAutoLink URLs inside parenthesis followed by another character are not parsed correctly* +- [X] **#355**: *simplifiedAutoLink URLs inside parenthesis followed by another character are not parsed correctly* +- [X] **#534**: *Multiple parentheses () in url link is not parsed correctly* - [ ] **#367**: *sublists rendering with 2 spaces* - related to disableForced4SpacesIndentedSublists option... - [ ] **#537**: *master branch doesn't work in a web worker* - ## CLI - [ ] Refactor the CLI - [ ] **#381**: *Support for src and dst directories in showdown cli* @@ -114,6 +113,7 @@ - [ ] **#486**: *A backslash at the end of the line is a hard line break* - [ ] **#548**: *anchors and images of subParser are errors when they are specific strings* - [ ] **#549**: *Strange parsing issue with ``*
+- [ ] Rethink the global variable
## NEW Features
diff --git a/dist/showdown.js b/dist/showdown.js
index b48250f..bdd07a8 100644
Binary files a/dist/showdown.js and b/dist/showdown.js differ
diff --git a/dist/showdown.js.map b/dist/showdown.js.map
index aee9c93..b9c2fd7 100644
Binary files a/dist/showdown.js.map and b/dist/showdown.js.map differ
diff --git a/dist/showdown.min.js b/dist/showdown.min.js
index 34f7e4c..ea2f7b5 100644
Binary files a/dist/showdown.min.js and b/dist/showdown.min.js differ
diff --git a/dist/showdown.min.js.map b/dist/showdown.min.js.map
index 5b5b37a..3f1838a 100644
Binary files a/dist/showdown.min.js.map and b/dist/showdown.min.js.map differ
diff --git a/src/helpers.js b/src/helpers.js
index 820b874..33cefd7 100644
--- a/src/helpers.js
+++ b/src/helpers.js
@@ -396,15 +396,26 @@ showdown.helper.unescapeHTMLEntities = function (txt) {
.replace(/&/g, '&');
};
+showdown.helper._hashHTMLSpan = function (html, globals) {
+ return '¨C' + (globals.gHtmlSpans.push(html) - 1) + 'C';
+};
+
/**
* Showdown's Event Object
* @param {string} name Name of the event
+ * @param {string} text Text
* @param {{}} params optional. params of the event
* @constructor
*/
showdown.helper.Event = function (name, text, params) {
'use strict';
+ var regexp = params.regexp || null;
+ var matches = params.matches || {};
+ var options = params.options || {};
+ var converter = params.converter || null;
+ var globals = params.globals || {};
+
/**
* Get the name of the event
* @returns {string}
@@ -417,12 +428,6 @@ showdown.helper.Event = function (name, text, params) {
return name;
};
- var regexp = params.regexp || null;
- var matches = params.matches || {};
- var options = params.options || {};
- var converter = params.converter || null;
- var globals = params.globals || {};
-
this._stopExecution = false;
this.parsedText = params.parsedText || null;
@@ -430,30 +435,39 @@ showdown.helper.Event = function (name, text, params) {
this.getRegexp = function () {
return regexp;
};
+
this.getOptions = function () {
return options;
};
+
this.getConverter = function () {
return converter;
};
+
this.getGlobals = function () {
return globals;
};
+
this.getCapturedText = function () {
return text;
};
+
this.getText = function () {
return text;
};
+
this.setText = function (newText) {
text = newText;
};
+
this.getMatches = function () {
return matches;
};
+
this.setMatches = function (newMatches) {
matches = newMatches;
};
+
this.preventDefault = function (bool) {
this._stopExecution = !bool;
};
@@ -485,7 +499,8 @@ if (typeof(console) === 'undefined') {
* We declare some common regexes to improve performance
*/
showdown.helper.regexes = {
- asteriskDashAndColon: /([*_:~])/g
+ asteriskDashTildeAndColon: /([*_:~])/g,
+ asteriskDashAndTilde: /([*_~])/g
};
/**
diff --git a/src/options.js b/src/options.js
index 24899b4..afefab0 100644
--- a/src/options.js
+++ b/src/options.js
@@ -51,11 +51,6 @@ function getDefaultOpts (simple) {
describe: 'Turn on/off GFM autolink style',
type: 'boolean'
},
- excludeTrailingPunctuationFromURLs: {
- defaultValue: false,
- describe: 'Excludes trailing punctuation from links generated with autoLinking',
- type: 'boolean'
- },
literalMidWordUnderscores: {
defaultValue: false,
describe: 'Parse midword underscores as literal underscores',
diff --git a/src/showdown.js b/src/showdown.js
index c2f6002..a13863d 100644
--- a/src/showdown.js
+++ b/src/showdown.js
@@ -11,7 +11,6 @@ var showdown = {},
github: {
omitExtraWLInCodeBlocks: true,
simplifiedAutoLink: true,
- excludeTrailingPunctuationFromURLs: true,
literalMidWordUnderscores: true,
strikethrough: true,
tables: true,
@@ -35,7 +34,6 @@ var showdown = {},
omitExtraWLInCodeBlocks: true,
parseImgDimensions: true,
simplifiedAutoLink: true,
- excludeTrailingPunctuationFromURLs: true,
literalMidWordUnderscores: true,
strikethrough: true,
tables: true,
diff --git a/src/subParsers/makehtml/autoLinks.js b/src/subParsers/makehtml/autoLinks.js
deleted file mode 100644
index ca39193..0000000
--- a/src/subParsers/makehtml/autoLinks.js
+++ /dev/null
@@ -1,79 +0,0 @@
-// url allowed chars [a-z\d_.~:/?#[]@!$&'()*+,;=-]
-
-var simpleURLRegex = /([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,
- simpleURLRegex2 = /([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,
- delimUrlRegex = /()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,
- simpleMailRegex = /(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gmi,
- delimMailRegex = /<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,
-
- replaceLink = function (options) {
- 'use strict';
- return function (wm, leadingMagicChars, link, m2, m3, trailingPunctuation, trailingMagicChars) {
- link = link.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);
- var lnkTxt = link,
- append = '',
- target = '',
- lmc = leadingMagicChars || '',
- tmc = trailingMagicChars || '';
- if (/^www\./i.test(link)) {
- link = link.replace(/^www\./i, 'http://www.');
- }
- if (options.excludeTrailingPunctuationFromURLs && trailingPunctuation) {
- append = trailingPunctuation;
- }
- if (options.openLinksInNewWindow) {
- target = ' target="¨E95Eblank"';
- }
- return lmc + '' + lnkTxt + '' + append + tmc;
- };
- },
-
- replaceMail = function (options, globals) {
- 'use strict';
- return function (wholeMatch, b, mail) {
- var href = 'mailto:';
- b = b || '';
- mail = showdown.subParser('makehtml.unescapeSpecialChars')(mail, options, globals);
- if (options.encodeEmails) {
- href = showdown.helper.encodeEmailAddress(href + mail);
- mail = showdown.helper.encodeEmailAddress(mail);
- } else {
- href = href + mail;
- }
- return b + '' + mail + '';
- };
- };
-
-showdown.subParser('makehtml.autoLinks', function (text, options, globals) {
- 'use strict';
-
- text = globals.converter._dispatch('makehtml.autoLinks.before', text, options, globals).getText();
-
- text = text.replace(delimUrlRegex, replaceLink(options));
- text = text.replace(delimMailRegex, replaceMail(options, globals));
-
- text = globals.converter._dispatch('makehtml.autoLinks.after', text, options, globals).getText();
-
- return text;
-});
-
-showdown.subParser('makehtml.simplifiedAutoLinks', function (text, options, globals) {
- 'use strict';
-
- if (!options.simplifiedAutoLink) {
- return text;
- }
-
- text = globals.converter._dispatch('makehtml.simplifiedAutoLinks.before', text, options, globals).getText();
-
- if (options.excludeTrailingPunctuationFromURLs) {
- text = text.replace(simpleURLRegex2, replaceLink(options));
- } else {
- text = text.replace(simpleURLRegex, replaceLink(options));
- }
- text = text.replace(simpleMailRegex, replaceMail(options, globals));
-
- text = globals.converter._dispatch('makehtml.simplifiedAutoLinks.after', text, options, globals).getText();
-
- return text;
-});
diff --git a/src/subParsers/makehtml/hashHTMLSpans.js b/src/subParsers/makehtml/hashHTMLSpans.js
index 0adb324..304b2cc 100644
--- a/src/subParsers/makehtml/hashHTMLSpans.js
+++ b/src/subParsers/makehtml/hashHTMLSpans.js
@@ -5,32 +5,26 @@ showdown.subParser('makehtml.hashHTMLSpans', function (text, options, globals) {
'use strict';
text = globals.converter._dispatch('makehtml.hashHTMLSpans.before', text, options, globals).getText();
- function hashHTMLSpan (html) {
- return '¨C' + (globals.gHtmlSpans.push(html) - 1) + 'C';
- }
-
// Hash Self Closing tags
text = text.replace(/<[^>]+?\/>/gi, function (wm) {
- return hashHTMLSpan(wm);
+ return showdown.helper._hashHTMLSpan(wm, globals);
});
// Hash tags without properties
text = text.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g, function (wm) {
- return hashHTMLSpan(wm);
+ return showdown.helper._hashHTMLSpan(wm, globals);
});
// Hash tags with properties
text = text.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g, function (wm) {
- return hashHTMLSpan(wm);
+ return showdown.helper._hashHTMLSpan(wm, globals);
});
// Hash self closing tags without />
text = text.replace(/<[^>]+?>/gi, function (wm) {
- return hashHTMLSpan(wm);
+ return showdown.helper._hashHTMLSpan(wm, globals);
});
- /*showdown.helper.matchRecursiveRegExp(text, ']*>', '
', 'gi');*/
-
text = globals.converter._dispatch('makehtml.hashHTMLSpans.after', text, options, globals).getText();
return text;
});
diff --git a/src/subParsers/makehtml/images.js b/src/subParsers/makehtml/images.js
index 65f72c6..63d9f09 100644
--- a/src/subParsers/makehtml/images.js
+++ b/src/subParsers/makehtml/images.js
@@ -56,16 +56,16 @@ showdown.subParser('makehtml.images', function (text, options, globals) {
altText = altText
.replace(/"/g, '"')
//altText = showdown.helper.escapeCharacters(altText, '*_', false);
- .replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);
+ .replace(showdown.helper.regexes.asteriskDashTildeAndColon, showdown.helper.escapeCharactersCallback);
//url = showdown.helper.escapeCharacters(url, '*_', false);
- url = url.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);
+ url = url.replace(showdown.helper.regexes.asteriskDashTildeAndColon, showdown.helper.escapeCharactersCallback);
var result = ' tags.
- */
-showdown.subParser('makehtml.links', function (text, options, globals) {
- 'use strict';
+////
+// makehtml/links.js
+// Copyright (c) 2018 ShowdownJS
+//
+// Transforms MD links into `` html anchors
+//
+// A link contains link text (the visible text), a link destination (the URI that is the link destination), and
+// optionally a link title. There are two basic kinds of links in Markdown.
+// In inline links the destination and title are given immediately after the link text.
+// In reference links the destination and title are defined elsewhere in the document.
+//
+// ***Author:***
+// - Estevão Soares dos Santos (Tivie)
+////
- text = globals.converter._dispatch('makehtml.links.before', text, options, globals).getText();
-
- var writeAnchorTag = function (rgx) {
-
- return function (wholeMatch1, linkText1, linkId1, url1, m5, m6, title1) {
- var evt = globals.converter._dispatch('makehtml.links.capturestart', wholeMatch1, options, globals, {
- regexp: rgx,
- matches: {
- wholeMatch: wholeMatch1,
- linkText: linkText1,
- linkId: linkId1,
- url: url1,
- title: title1
- }
- });
-
- var wholeMatch = evt.getMatches().wholeMatch;
- var linkText = evt.getMatches().linkText;
- var linkId = evt.getMatches().linkId;
- var url = evt.getMatches().url;
- var title = evt.getMatches().title;
-
- if (showdown.helper.isUndefined(title)) {
- title = '';
- }
- linkId = linkId.toLowerCase();
-
- // Special case for explicit empty url
- if (wholeMatch.search(/\(\s*>? ?(['"].*['"])?\)$/m) > -1) {
- url = '';
- } else if (!url) {
- if (!linkId) {
- // lower-case and turn embedded newlines into spaces
- linkId = linkText.toLowerCase().replace(/ ?\n/g, ' ');
- }
- url = '#' + linkId;
-
- if (!showdown.helper.isUndefined(globals.gUrls[linkId])) {
- url = globals.gUrls[linkId];
- if (!showdown.helper.isUndefined(globals.gTitles[linkId])) {
- title = globals.gTitles[linkId];
- }
- } else {
- return wholeMatch;
- }
+(function () {
+ /**
+ * Helper function: Wrapper function to pass as second replace parameter
+ *
+ * @param {RegExp} rgx
+ * @param {string} evtRootName
+ * @param {{}} options
+ * @param {{}} globals
+ * @returns {Function}
+ */
+ function replaceAnchorTag (rgx, evtRootName, options, globals, emptyCase) {
+ emptyCase = !!emptyCase;
+ return function (wholeMatch, text, id, url, m5, m6, title) {
+ // bail we we find 2 newlines somewhere
+ if (/\n\n/.test(wholeMatch)) {
+ return wholeMatch;
}
- //url = showdown.helper.escapeCharacters(url, '*_:~', false); // replaced line to improve performance
- url = url.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);
-
- var result = '' + linkText + '';
-
- return result;
+ var evt = createEvent(rgx, evtRootName + '.captureStart', wholeMatch, text, id, url, title, options, globals);
+ return writeAnchorTag(evt, options, globals, emptyCase);
};
- };
+ }
- var referenceRegex = /\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g;
- // First, handle reference-style links: [link text] [id]
- text = text.replace(referenceRegex, writeAnchorTag(referenceRegex));
+ /**
+ * TODO Normalize this
+ * Helper function: Create a capture event
+ * @param {RegExp} rgx
+ * @param {String} evtName Event name
+ * @param {String} wholeMatch
+ * @param {String} text
+ * @param {String} id
+ * @param {String} url
+ * @param {String} title
+ * @param {{}} options
+ * @param {{}} globals
+ * @returns {showdown.helper.Event|*}
+ */
+ function createEvent (rgx, evtName, wholeMatch, text, id, url, title, options, globals) {
+ return globals.converter._dispatch(evtName, wholeMatch, options, globals, {
+ regexp: rgx,
+ matches: {
+ wholeMatch: wholeMatch,
+ text: text,
+ id: id,
+ url: url,
+ title: title
+ }
+ });
+ }
- // Next, inline-style links: [link text](url "optional title")
- // cases with crazy urls like ./image/cat1).png
- var inlineRegexCrazy = /\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g;
- text = text.replace(inlineRegexCrazy, writeAnchorTag(inlineRegexCrazy));
+ /**
+ * Helper Function: Normalize and write an anchor tag based on passed parameters
+ * @param evt
+ * @param options
+ * @param globals
+ * @param {boolean} emptyCase
+ * @returns {string}
+ */
+ function writeAnchorTag (evt, options, globals, emptyCase) {
- // normal cases
- var inlineRegex = /\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g;
- text = text.replace(inlineRegex, writeAnchorTag(inlineRegex));
+ var wholeMatch = evt.getMatches().wholeMatch;
+ var text = evt.getMatches().text;
+ var id = evt.getMatches().id;
+ var url = evt.getMatches().url;
+ var title = evt.getMatches().title;
+ var target = '';
- // handle reference-style shortcuts: [link text]
- // These must come last in case you've also got [link test][1]
- // or [link test](/foo)
- var referenceShortcutRegex = /\[([^\[\]]+)]()()()()()/g;
- text = text.replace(referenceShortcutRegex, writeAnchorTag(referenceShortcutRegex));
+ if (!title) {
+ title = '';
+ }
+ id = (id) ? id.toLowerCase() : '';
- // Lastly handle GithubMentions if option is enabled
- if (options.ghMentions) {
- text = text.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d._-]+?[a-z\d]+)*))/gmi, function (wm, st, escape, mentions, username) {
+ if (emptyCase) {
+ url = '';
+ } else if (!url) {
+ if (!id) {
+ // lower-case and turn embedded newlines into spaces
+ id = text.toLowerCase().replace(/ ?\n/g, ' ');
+ }
+ url = '#' + id;
+
+ if (!showdown.helper.isUndefined(globals.gUrls[id])) {
+ url = globals.gUrls[id];
+ if (!showdown.helper.isUndefined(globals.gTitles[id])) {
+ title = globals.gTitles[id];
+ }
+ } else {
+ return wholeMatch;
+ }
+ }
+ //url = showdown.helper.escapeCharacters(url, '*_:~', false); // replaced line to improve performance
+ url = url.replace(showdown.helper.regexes.asteriskDashTildeAndColon, showdown.helper.escapeCharactersCallback);
+
+ if (title !== '' && title !== null) {
+ title = title.replace(/"/g, '"');
+ //title = showdown.helper.escapeCharacters(title, '*_', false); // replaced line to improve performance
+ title = title.replace(showdown.helper.regexes.asteriskDashTildeAndColon, showdown.helper.escapeCharactersCallback);
+ title = ' title="' + title + '"';
+ }
+
+ // optionLinksInNewWindow only applies
+ // to external links. Hash links (#) open in same page
+ if (options.openLinksInNewWindow && !/^#/.test(url)) {
+ // escaped _
+ target = ' target="¨E95Eblank"';
+ }
+
+ // Text can be a markdown element, so we run through the appropriate parsers
+ text = showdown.subParser('makehtml.codeSpans')(text, options, globals);
+ text = showdown.subParser('makehtml.emoji')(text, options, globals);
+ text = showdown.subParser('makehtml.underline')(text, options, globals);
+ text = showdown.subParser('makehtml.italicsAndBold')(text, options, globals);
+ text = showdown.subParser('makehtml.strikethrough')(text, options, globals);
+ text = showdown.subParser('makehtml.ellipsis')(text, options, globals);
+ text = showdown.subParser('makehtml.hashHTMLSpans')(text, options, globals);
+
+ //evt = createEvent(rgx, evtRootName + '.captureEnd', wholeMatch, text, id, url, title, options, globals);
+
+ var result = '' + text + '';
+
+ //evt = createEvent(rgx, evtRootName + '.beforeHash', wholeMatch, text, id, url, title, options, globals);
+
+ result = showdown.subParser('makehtml.hashHTMLSpans')(result, options, globals);
+
+ return result;
+ }
+
+ var evtRootName = 'makehtml.links';
+
+ /**
+ * Turn Markdown link shortcuts into XHTML tags.
+ */
+ showdown.subParser('makehtml.links', function (text, options, globals) {
+
+ text = globals.converter._dispatch(evtRootName + '.start', text, options, globals).getText();
+
+ // 1. Handle reference-style links: [link text] [id]
+ text = showdown.subParser('makehtml.links.reference')(text, options, globals);
+
+ // 2. Handle inline-style links: [link text](url "optional title")
+ text = showdown.subParser('makehtml.links.inline')(text, options, globals);
+
+ // 3. Handle reference-style shortcuts: [link text]
+ // These must come last in case there's a [link text][1] or [link text](/foo)
+ text = showdown.subParser('makehtml.links.referenceShortcut')(text, options, globals);
+
+ // 4. Handle angle brackets links -> ` `
+ // Must come after links, because you can use < and > delimiters in inline links like [this]().
+ text = showdown.subParser('makehtml.links.angleBrackets')(text, options, globals);
+
+ // 5. Handle GithubMentions (if option is enabled)
+ text = showdown.subParser('makehtml.links.ghMentions')(text, options, globals);
+
+ // 6. Handle tags and img tags
+ text = text.replace(/]*>[\s\S]*<\/a>/g, function (wholeMatch) {
+ return showdown.helper._hashHTMLSpan(wholeMatch, globals);
+ });
+
+ text = text.replace(/]*\/?>/g, function (wholeMatch) {
+ return showdown.helper._hashHTMLSpan(wholeMatch, globals);
+ });
+
+ // 7. Handle naked links (if option is enabled)
+ text = showdown.subParser('makehtml.links.naked')(text, options, globals);
+
+ text = globals.converter._dispatch(evtRootName + '.end', text, options, globals).getText();
+ return text;
+ });
+
+ /**
+ * TODO WRITE THIS DOCUMENTATION
+ */
+ showdown.subParser('makehtml.links.inline', function (text, options, globals) {
+ var evtRootName = evtRootName + '.inline';
+
+ text = globals.converter._dispatch(evtRootName + '.start', text, options, globals).getText();
+
+ // 1. Look for empty cases: []() and [empty]() and []("title")
+ var rgxEmpty = /\[(.*?)]()()()()\( ?>? ?(?:["'](.*)["'])?\)/g;
+ text = text.replace(rgxEmpty, replaceAnchorTag(rgxEmpty, evtRootName, options, globals, true));
+
+ // 2. Look for cases with crazy urls like ./image/cat1).png
+ var rgxCrazy = /\[((?:\[[^\]]*]|[^\[\]])*)]()\s?\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g;
+ text = text.replace(rgxCrazy, replaceAnchorTag(rgxCrazy, evtRootName, options, globals));
+
+ // 3. inline links with no title or titles wrapped in ' or ":
+ // [text](url.com) || [text]() || [text](url.com "title") || [text]( "title")
+ //var rgx2 = /\[[ ]*[\s]?[ ]*([^\n\[\]]*?)[ ]*[\s]?[ ]*] ?()\([ ]*[\s]?[ ]*([^\s'"]*)>?(?:[ ]*[\n]?[ ]*()(['"])(.*?)\5)?[ ]*[\s]?[ ]*\)/; // this regex is too slow!!!
+ var rgx2 = /\[([\S ]*?)]\s?()\( *([^\s'"]*?(?:\([\S]*?\)[\S]*?)?)>?\s*(?:()(['"])(.*?)\5)? *\)/g;
+ text = text.replace(rgx2, replaceAnchorTag(rgx2, evtRootName, options, globals));
+
+ // 4. inline links with titles wrapped in (): [foo](bar.com (title))
+ var rgx3 = /\[([\S ]*?)]\s?()\( *([^\s'"]*?(?:\([\S]*?\)[\S]*?)?)>?\s+()()\((.*?)\) *\)/g;
+ text = text.replace(rgx3, replaceAnchorTag(rgx3, evtRootName, options, globals));
+
+ text = globals.converter._dispatch(evtRootName + '.end', text, options, globals).getText();
+
+ return text;
+ });
+
+ /**
+ * TODO WRITE THIS DOCUMENTATION
+ */
+ showdown.subParser('makehtml.links.reference', function (text, options, globals) {
+ var evtRootName = evtRootName + '.reference';
+
+ text = globals.converter._dispatch(evtRootName + '.start', text, options, globals).getText();
+
+ var rgx = /\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g;
+ text = text.replace(rgx, replaceAnchorTag(rgx, evtRootName, options, globals));
+
+ text = globals.converter._dispatch(evtRootName + '.end', text, options, globals).getText();
+
+ return text;
+ });
+
+ /**
+ * TODO WRITE THIS DOCUMENTATION
+ */
+ showdown.subParser('makehtml.links.referenceShortcut', function (text, options, globals) {
+ var evtRootName = evtRootName + '.referenceShortcut';
+
+ text = globals.converter._dispatch(evtRootName + '.start', text, options, globals).getText();
+
+ var rgx = /\[([^\[\]]+)]()()()()()/g;
+ text = text.replace(rgx, replaceAnchorTag(rgx, evtRootName, options, globals));
+
+ text = globals.converter._dispatch(evtRootName + '.end', text, options, globals).getText();
+
+ return text;
+ });
+
+ /**
+ * TODO WRITE THIS DOCUMENTATION
+ */
+ showdown.subParser('makehtml.links.ghMentions', function (text, options, globals) {
+ var evtRootName = evtRootName + 'ghMentions';
+
+ if (!options.ghMentions) {
+ return text;
+ }
+
+ text = globals.converter._dispatch(evtRootName + '.start', text, options, globals).getText();
+
+ var rgx = /(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d._-]+?[a-z\d]+)*))/gi;
+
+ text = text.replace(rgx, function (wholeMatch, st, escape, mentions, username) {
+ // bail if the mentions was escaped
if (escape === '\\') {
return st + mentions;
}
- //check if options.ghMentionsLink is a string
+ // check if options.ghMentionsLink is a string
+ // TODO Validation should be done at initialization not at runtime
if (!showdown.helper.isString(options.ghMentionsLink)) {
throw new Error('ghMentionsLink option must be a string');
}
- var lnk = options.ghMentionsLink.replace(/\{u}/g, username),
- target = '';
- if (options.openLinksInNewWindow) {
- target = ' target="¨E95Eblank"';
+ var url = options.ghMentionsLink.replace(/{u}/g, username);
+ var evt = createEvent(rgx, evtRootName + '.captureStart', wholeMatch, mentions, null, url, null, options, globals);
+ // captureEnd Event is triggered inside writeAnchorTag function
+ return st + writeAnchorTag(evt, options, globals);
+ });
+
+ text = globals.converter._dispatch(evtRootName + '.end', text, options, globals).getText();
+
+ return text;
+ });
+
+ /**
+ * TODO WRITE THIS DOCUMENTATION
+ */
+ showdown.subParser('makehtml.links.angleBrackets', function (text, options, globals) {
+ var evtRootName = 'makehtml.links.angleBrackets';
+
+ text = globals.converter._dispatch(evtRootName + '.start', text, options, globals).getText();
+
+ // 1. Parse links first
+ var urlRgx = /<(((?:https?|ftp):\/\/|www\.)[^'">\s]+)>/gi;
+ text = text.replace(urlRgx, function (wholeMatch, url, urlStart) {
+ var text = url;
+ url = (urlStart === 'www.') ? 'http://' + url : url;
+ var evt = createEvent(urlRgx, evtRootName + '.captureStart', wholeMatch, text, null, url, null, options, globals);
+ return writeAnchorTag(evt, options, globals);
+ });
+
+ // 2. Then Mail Addresses
+ var mailRgx = /<(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi;
+ text = text.replace(mailRgx, function (wholeMatch, mail) {
+ var url = 'mailto:';
+ mail = showdown.subParser('makehtml.unescapeSpecialChars')(mail, options, globals);
+ if (options.encodeEmails) {
+ url = showdown.helper.encodeEmailAddress(url + mail);
+ mail = showdown.helper.encodeEmailAddress(mail);
+ } else {
+ url = url + mail;
+ }
+ var evt = createEvent(mailRgx, evtRootName + '.captureStart', wholeMatch, mail, null, url, null, options, globals);
+ return writeAnchorTag(evt, options, globals);
+ });
+
+ text = globals.converter._dispatch(evtRootName + '.end', text, options, globals).getText();
+ return text;
+ });
+
+ /**
+ * TODO MAKE THIS WORK (IT'S NOT ACTIVATED)
+ * TODO WRITE THIS DOCUMENTATION
+ */
+ showdown.subParser('makehtml.links.naked', function (text, options, globals) {
+ if (!options.simplifiedAutoLink) {
+ return text;
+ }
+
+ var evtRootName = 'makehtml.links.naked';
+
+ text = globals.converter._dispatch(evtRootName + '.start', text, options, globals).getText();
+
+ // 2. Now we check for
+ // we also include leading markdown magic chars [_*~] for cases like __https://www.google.com/foobar__
+ var urlRgx = /([_*~]*?)(((?:https?|ftp):\/\/|www\.)[^\s<>"'`´.-][^\s<>"'`´]*?\.[a-z\d.]+[^\s<>"']*)\1/gi;
+ text = text.replace(urlRgx, function (wholeMatch, leadingMDChars, url, urlPrefix) {
+
+ // we now will start traversing the url from the front to back, looking for punctuation chars [_*~,;:.!?\)\]]
+ var len = url.length;
+ var suffix = '';
+ for (var i = len - 1; i >= 0; --i) {
+ var char = url.charAt(i);
+
+ if (/[_*~,;:.!?]/.test(char)) {
+ // it's a punctuation char
+ // we remove it from the url
+ url = url.slice(0, -1);
+ // and prepend it to the suffix
+ suffix = char + suffix;
+ } else if (/\)/.test(char)) {
+ var opPar = url.match(/\(/g) || [];
+ var clPar = url.match(/\)/g);
+
+ // it's a curved parenthesis so we need to check for "balance" (kinda)
+ if (opPar.length < clPar.length) {
+ // there are more closing Parenthesis than opening so chop it!!!!!
+ url = url.slice(0, -1);
+ // and prepend it to the suffix
+ suffix = char + suffix;
+ } else {
+ // it's (kinda) balanced so our work is done
+ break;
+ }
+ } else if (/]/.test(char)) {
+ var opPar2 = url.match(/\[/g) || [];
+ var clPar2 = url.match(/\]/g);
+ // it's a squared parenthesis so we need to check for "balance" (kinda)
+ if (opPar2.length < clPar2.length) {
+ // there are more closing Parenthesis than opening so chop it!!!!!
+ url = url.slice(0, -1);
+ // and prepend it to the suffix
+ suffix = char + suffix;
+ } else {
+ // it's (kinda) balanced so our work is done
+ break;
+ }
+ } else {
+ // it's not a punctuation or a parenthesis so our work is done
+ break;
+ }
}
- // lnk = showdown.helper.escapeCharacters(lnk, '*_', false); // replaced line to improve performance
- lnk = lnk.replace(showdown.helper.regexes.asteriskDashAndColon, showdown.helper.escapeCharactersCallback);
+ // we copy the treated url to the text variable
+ var text = url;
+ // finally, if it's a www shortcut, we prepend http
+ url = (urlPrefix === 'www.') ? 'http://' + url : url;
- return st + '' + mentions + '';
+ // url part is done so let's take care of text now
+ // we need to escape the text (because of links such as www.example.com/foo__bar__baz)
+ text = text.replace(showdown.helper.regexes.asteriskDashTildeAndColon, showdown.helper.escapeCharactersCallback);
+
+ // finally we dispatch the event
+ var evt = createEvent(urlRgx, evtRootName + '.captureStart', wholeMatch, text, null, url, null, options, globals);
+
+ // and return the link tag, with the leadingMDChars and suffix. The leadingMDChars are added at the end too because
+ // we consumed those characters in the regexp
+ return leadingMDChars + writeAnchorTag(evt, options, globals) + suffix + leadingMDChars;
});
- }
- text = globals.converter._dispatch('makehtml.links.after', text, options, globals).getText();
- return text;
-});
+ // 2. Then mails
+ var mailRgx = /(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gmi;
+ text = text.replace(mailRgx, function (wholeMatch, leadingChar, mail) {
+ var url = 'mailto:';
+ mail = showdown.subParser('makehtml.unescapeSpecialChars')(mail, options, globals);
+ if (options.encodeEmails) {
+ url = showdown.helper.encodeEmailAddress(url + mail);
+ mail = showdown.helper.encodeEmailAddress(mail);
+ } else {
+ url = url + mail;
+ }
+ var evt = createEvent(mailRgx, evtRootName + '.captureStart', wholeMatch, mail, null, url, null, options, globals);
+ return leadingChar + writeAnchorTag(evt, options, globals);
+ });
+
+
+ text = globals.converter._dispatch(evtRootName + '.end', text, options, globals).getText();
+ return text;
+ });
+})();
diff --git a/src/subParsers/makehtml/spanGamut.js b/src/subParsers/makehtml/spanGamut.js
index 20a1a9f..2f2205b 100644
--- a/src/subParsers/makehtml/spanGamut.js
+++ b/src/subParsers/makehtml/spanGamut.js
@@ -5,7 +5,8 @@
showdown.subParser('makehtml.spanGamut', function (text, options, globals) {
'use strict';
- text = globals.converter._dispatch('smakehtml.panGamut.before', text, options, globals).getText();
+ text = globals.converter._dispatch('makehtml.span.before', text, options, globals).getText();
+
text = showdown.subParser('makehtml.codeSpans')(text, options, globals);
text = showdown.subParser('makehtml.escapeSpecialCharsWithinTagAttributes')(text, options, globals);
text = showdown.subParser('makehtml.encodeBackslashEscapes')(text, options, globals);
@@ -13,13 +14,13 @@ showdown.subParser('makehtml.spanGamut', function (text, options, globals) {
// Process link and image tags. Images must come first,
// because ![foo][f] looks like a link.
text = showdown.subParser('makehtml.images')(text, options, globals);
- text = showdown.subParser('makehtml.links')(text, options, globals);
- // Make links out of things like ` `
- // Must come after links, because you can use < and >
- // delimiters in inline links like [this]().
- text = showdown.subParser('makehtml.autoLinks')(text, options, globals);
- text = showdown.subParser('makehtml.simplifiedAutoLinks')(text, options, globals);
+ text = globals.converter._dispatch('smakehtml.links.before', text, options, globals).getText();
+ text = showdown.subParser('makehtml.links')(text, options, globals);
+ text = globals.converter._dispatch('smakehtml.links.after', text, options, globals).getText();
+
+ //text = showdown.subParser('makehtml.autoLinks')(text, options, globals);
+ //text = showdown.subParser('makehtml.simplifiedAutoLinks')(text, options, globals);
text = showdown.subParser('makehtml.emoji')(text, options, globals);
text = showdown.subParser('makehtml.underline')(text, options, globals);
text = showdown.subParser('makehtml.italicsAndBold')(text, options, globals);
diff --git a/src/subParsers/makehtml/strikethrough.js b/src/subParsers/makehtml/strikethrough.js
index a6251fb..ca8f630 100644
--- a/src/subParsers/makehtml/strikethrough.js
+++ b/src/subParsers/makehtml/strikethrough.js
@@ -1,16 +1,9 @@
showdown.subParser('makehtml.strikethrough', function (text, options, globals) {
'use strict';
- function parseInside (txt) {
- if (options.simplifiedAutoLink) {
- txt = showdown.subParser('makehtml.simplifiedAutoLinks')(txt, options, globals);
- }
- return '' + txt + '';
- }
-
if (options.strikethrough) {
text = globals.converter._dispatch('makehtml.strikethrough.before', text, options, globals).getText();
- text = text.replace(/(?:~){2}([\s\S]+?)(?:~){2}/g, function (wm, txt) { return parseInside(txt); });
+ text = text.replace(/(?:~){2}([\s\S]+?)(?:~){2}/g, function (wm, txt) { return '' + txt + ''; });
text = globals.converter._dispatch('makehtml.strikethrough.after', text, options, globals).getText();
}
diff --git a/test/functional/makehtml/cases/commonmark.testsuite.json b/test/functional/makehtml/cases/commonmark.testsuite.json
new file mode 100644
index 0000000..48ae93f
--- /dev/null
+++ b/test/functional/makehtml/cases/commonmark.testsuite.json
@@ -0,0 +1,4994 @@
+[
+ {
+ "end_line": 355,
+ "section": "Tabs",
+ "html": "foo\tbaz\t\tbim\n
\n",
+ "markdown": "\tfoo\tbaz\t\tbim\n",
+ "example": 1,
+ "start_line": 350
+ },
+ {
+ "end_line": 362,
+ "section": "Tabs",
+ "html": "foo\tbaz\t\tbim\n
\n",
+ "markdown": " \tfoo\tbaz\t\tbim\n",
+ "example": 2,
+ "start_line": 357
+ },
+ {
+ "end_line": 371,
+ "section": "Tabs",
+ "html": "a\ta\nὐ\ta\n
\n",
+ "markdown": " a\ta\n ὐ\ta\n",
+ "example": 3,
+ "start_line": 364
+ },
+ {
+ "end_line": 388,
+ "section": "Tabs",
+ "html": "\n- \n
foo
\nbar
\n \n
\n",
+ "markdown": " - foo\n\n\tbar\n",
+ "example": 4,
+ "start_line": 377
+ },
+ {
+ "end_line": 402,
+ "section": "Tabs",
+ "html": "\n- \n
foo
\n bar\n
\n \n
\n",
+ "markdown": "- foo\n\n\t\tbar\n",
+ "example": 5,
+ "start_line": 390
+ },
+ {
+ "end_line": 420,
+ "section": "Tabs",
+ "html": "\n foo\n
\n
\n",
+ "markdown": ">\t\tfoo\n",
+ "example": 6,
+ "start_line": 413
+ },
+ {
+ "end_line": 431,
+ "section": "Tabs",
+ "html": "\n- \n
foo\n
\n \n
\n",
+ "markdown": "-\t\tfoo\n",
+ "example": 7,
+ "start_line": 422
+ },
+ {
+ "end_line": 441,
+ "section": "Tabs",
+ "html": "foo\nbar\n
\n",
+ "markdown": " foo\n\tbar\n",
+ "example": 8,
+ "start_line": 434
+ },
+ {
+ "end_line": 459,
+ "section": "Tabs",
+ "html": "\n- foo\n
\n- bar\n
\n- baz
\n
\n \n
\n \n
\n",
+ "markdown": " - foo\n - bar\n\t - baz\n",
+ "example": 9,
+ "start_line": 443
+ },
+ {
+ "end_line": 465,
+ "section": "Tabs",
+ "html": "Foo
\n",
+ "markdown": "#\tFoo\n",
+ "example": 10,
+ "start_line": 461
+ },
+ {
+ "end_line": 471,
+ "section": "Tabs",
+ "html": "
\n",
+ "markdown": "*\t*\t*\t\n",
+ "example": 11,
+ "start_line": 467
+ },
+ {
+ "end_line": 502,
+ "section": "Precedence",
+ "html": "\n- `one
\n- two`
\n
\n",
+ "markdown": "- `one\n- two`\n",
+ "example": 12,
+ "start_line": 494
+ },
+ {
+ "end_line": 541,
+ "section": "Thematic breaks",
+ "html": "
\n
\n
\n",
+ "markdown": "***\n\n---\n\n___\n\n",
+ "example": 13,
+ "start_line": 533
+ },
+ {
+ "end_line": 550,
+ "section": "Thematic breaks",
+ "html": "+++
\n",
+ "markdown": "+++\n",
+ "example": 14,
+ "start_line": 546
+ },
+ {
+ "end_line": 557,
+ "section": "Thematic breaks",
+ "html": "===
\n",
+ "markdown": "===\n",
+ "example": 15,
+ "start_line": 553
+ },
+ {
+ "end_line": 570,
+ "section": "Thematic breaks",
+ "html": "--\n**\n__
\n",
+ "markdown": "--\n**\n__\n",
+ "example": 16,
+ "start_line": 562
+ },
+ {
+ "end_line": 583,
+ "section": "Thematic breaks",
+ "html": "
\n
\n
\n",
+ "markdown": " ***\n ***\n ***\n",
+ "example": 17,
+ "start_line": 575
+ },
+ {
+ "end_line": 593,
+ "section": "Thematic breaks",
+ "html": "***\n
\n",
+ "markdown": " ***\n",
+ "example": 18,
+ "start_line": 588
+ },
+ {
+ "end_line": 602,
+ "section": "Thematic breaks",
+ "html": "Foo\n***
\n",
+ "markdown": "Foo\n ***\n",
+ "example": 19,
+ "start_line": 596
+ },
+ {
+ "end_line": 611,
+ "section": "Thematic breaks",
+ "html": "
\n",
+ "markdown": "_____________________________________\n",
+ "example": 20,
+ "start_line": 607
+ },
+ {
+ "end_line": 620,
+ "section": "Thematic breaks",
+ "html": "
\n",
+ "markdown": " - - -\n",
+ "example": 21,
+ "start_line": 616
+ },
+ {
+ "end_line": 627,
+ "section": "Thematic breaks",
+ "html": "
\n",
+ "markdown": " ** * ** * ** * **\n",
+ "example": 22,
+ "start_line": 623
+ },
+ {
+ "end_line": 634,
+ "section": "Thematic breaks",
+ "html": "
\n",
+ "markdown": "- - - -\n",
+ "example": 23,
+ "start_line": 630
+ },
+ {
+ "end_line": 643,
+ "section": "Thematic breaks",
+ "html": "
\n",
+ "markdown": "- - - - \n",
+ "example": 24,
+ "start_line": 639
+ },
+ {
+ "end_line": 658,
+ "section": "Thematic breaks",
+ "html": "_ _ _ _ a
\na------
\n---a---
\n",
+ "markdown": "_ _ _ _ a\n\na------\n\n---a---\n",
+ "example": 25,
+ "start_line": 648
+ },
+ {
+ "end_line": 668,
+ "section": "Thematic breaks",
+ "html": "-
\n",
+ "markdown": " *-*\n",
+ "example": 26,
+ "start_line": 664
+ },
+ {
+ "end_line": 685,
+ "section": "Thematic breaks",
+ "html": "\n- foo
\n
\n
\n\n- bar
\n
\n",
+ "markdown": "- foo\n***\n- bar\n",
+ "example": 27,
+ "start_line": 673
+ },
+ {
+ "end_line": 698,
+ "section": "Thematic breaks",
+ "html": "Foo
\n
\nbar
\n",
+ "markdown": "Foo\n***\nbar\n",
+ "example": 28,
+ "start_line": 690
+ },
+ {
+ "end_line": 714,
+ "section": "Thematic breaks",
+ "html": "Foo
\nbar
\n",
+ "markdown": "Foo\n---\nbar\n",
+ "example": 29,
+ "start_line": 707
+ },
+ {
+ "end_line": 732,
+ "section": "Thematic breaks",
+ "html": "\n- Foo
\n
\n
\n\n- Bar
\n
\n",
+ "markdown": "* Foo\n* * *\n* Bar\n",
+ "example": 30,
+ "start_line": 720
+ },
+ {
+ "end_line": 747,
+ "section": "Thematic breaks",
+ "html": "\n- Foo
\n- \n
\n \n
\n",
+ "markdown": "- Foo\n- * * *\n",
+ "example": 31,
+ "start_line": 737
+ },
+ {
+ "end_line": 780,
+ "section": "ATX headings",
+ "html": "foo
\nfoo
\nfoo
\nfoo
\nfoo
\nfoo
\n",
+ "markdown": "# foo\n## foo\n### foo\n#### foo\n##### foo\n###### foo\n",
+ "example": 32,
+ "start_line": 766
+ },
+ {
+ "end_line": 789,
+ "section": "ATX headings",
+ "html": "####### foo
\n",
+ "markdown": "####### foo\n",
+ "example": 33,
+ "start_line": 785
+ },
+ {
+ "end_line": 807,
+ "section": "ATX headings",
+ "html": "#5 bolt
\n#hashtag
\n",
+ "markdown": "#5 bolt\n\n#hashtag\n",
+ "example": 34,
+ "start_line": 800
+ },
+ {
+ "end_line": 816,
+ "section": "ATX headings",
+ "html": "## foo
\n",
+ "markdown": "\\## foo\n",
+ "example": 35,
+ "start_line": 812
+ },
+ {
+ "end_line": 825,
+ "section": "ATX headings",
+ "html": "foo bar *baz*
\n",
+ "markdown": "# foo *bar* \\*baz\\*\n",
+ "example": 36,
+ "start_line": 821
+ },
+ {
+ "end_line": 834,
+ "section": "ATX headings",
+ "html": "foo
\n",
+ "markdown": "# foo \n",
+ "example": 37,
+ "start_line": 830
+ },
+ {
+ "end_line": 847,
+ "section": "ATX headings",
+ "html": "foo
\nfoo
\nfoo
\n",
+ "markdown": " ### foo\n ## foo\n # foo\n",
+ "example": 38,
+ "start_line": 839
+ },
+ {
+ "end_line": 857,
+ "section": "ATX headings",
+ "html": "# foo\n
\n",
+ "markdown": " # foo\n",
+ "example": 39,
+ "start_line": 852
+ },
+ {
+ "end_line": 866,
+ "section": "ATX headings",
+ "html": "foo\n# bar
\n",
+ "markdown": "foo\n # bar\n",
+ "example": 40,
+ "start_line": 860
+ },
+ {
+ "end_line": 877,
+ "section": "ATX headings",
+ "html": "foo
\nbar
\n",
+ "markdown": "## foo ##\n ### bar ###\n",
+ "example": 41,
+ "start_line": 871
+ },
+ {
+ "end_line": 888,
+ "section": "ATX headings",
+ "html": "foo
\nfoo
\n",
+ "markdown": "# foo ##################################\n##### foo ##\n",
+ "example": 42,
+ "start_line": 882
+ },
+ {
+ "end_line": 897,
+ "section": "ATX headings",
+ "html": "foo
\n",
+ "markdown": "### foo ### \n",
+ "example": 43,
+ "start_line": 893
+ },
+ {
+ "end_line": 908,
+ "section": "ATX headings",
+ "html": "foo ### b
\n",
+ "markdown": "### foo ### b\n",
+ "example": 44,
+ "start_line": 904
+ },
+ {
+ "end_line": 917,
+ "section": "ATX headings",
+ "html": "foo#
\n",
+ "markdown": "# foo#\n",
+ "example": 45,
+ "start_line": 913
+ },
+ {
+ "end_line": 931,
+ "section": "ATX headings",
+ "html": "foo ###
\nfoo ###
\nfoo #
\n",
+ "markdown": "### foo \\###\n## foo #\\##\n# foo \\#\n",
+ "example": 46,
+ "start_line": 923
+ },
+ {
+ "end_line": 945,
+ "section": "ATX headings",
+ "html": "
\nfoo
\n
\n",
+ "markdown": "****\n## foo\n****\n",
+ "example": 47,
+ "start_line": 937
+ },
+ {
+ "end_line": 956,
+ "section": "ATX headings",
+ "html": "Foo bar
\nbaz
\nBar foo
\n",
+ "markdown": "Foo bar\n# baz\nBar foo\n",
+ "example": 48,
+ "start_line": 948
+ },
+ {
+ "end_line": 969,
+ "section": "ATX headings",
+ "html": "\n\n\n",
+ "markdown": "## \n#\n### ###\n",
+ "example": 49,
+ "start_line": 961
+ },
+ {
+ "end_line": 1013,
+ "section": "Setext headings",
+ "html": "Foo bar
\nFoo bar
\n",
+ "markdown": "Foo *bar*\n=========\n\nFoo *bar*\n---------\n",
+ "example": 50,
+ "start_line": 1004
+ },
+ {
+ "end_line": 1025,
+ "section": "Setext headings",
+ "html": "Foo bar\nbaz
\n",
+ "markdown": "Foo *bar\nbaz*\n====\n",
+ "example": 51,
+ "start_line": 1018
+ },
+ {
+ "end_line": 1039,
+ "section": "Setext headings",
+ "html": "Foo
\nFoo
\n",
+ "markdown": "Foo\n-------------------------\n\nFoo\n=\n",
+ "example": 52,
+ "start_line": 1030
+ },
+ {
+ "end_line": 1058,
+ "section": "Setext headings",
+ "html": "Foo
\nFoo
\nFoo
\n",
+ "markdown": " Foo\n---\n\n Foo\n-----\n\n Foo\n ===\n",
+ "example": 53,
+ "start_line": 1045
+ },
+ {
+ "end_line": 1076,
+ "section": "Setext headings",
+ "html": "Foo\n---\n\nFoo\n
\n
\n",
+ "markdown": " Foo\n ---\n\n Foo\n---\n",
+ "example": 54,
+ "start_line": 1063
+ },
+ {
+ "end_line": 1087,
+ "section": "Setext headings",
+ "html": "Foo
\n",
+ "markdown": "Foo\n ---- \n",
+ "example": 55,
+ "start_line": 1082
+ },
+ {
+ "end_line": 1098,
+ "section": "Setext headings",
+ "html": "Foo\n---
\n",
+ "markdown": "Foo\n ---\n",
+ "example": 56,
+ "start_line": 1092
+ },
+ {
+ "end_line": 1114,
+ "section": "Setext headings",
+ "html": "Foo\n= =
\nFoo
\n
\n",
+ "markdown": "Foo\n= =\n\nFoo\n--- -\n",
+ "example": 57,
+ "start_line": 1103
+ },
+ {
+ "end_line": 1124,
+ "section": "Setext headings",
+ "html": "Foo
\n",
+ "markdown": "Foo \n-----\n",
+ "example": 58,
+ "start_line": 1119
+ },
+ {
+ "end_line": 1134,
+ "section": "Setext headings",
+ "html": "Foo\\
\n",
+ "markdown": "Foo\\\n----\n",
+ "example": 59,
+ "start_line": 1129
+ },
+ {
+ "end_line": 1153,
+ "section": "Setext headings",
+ "html": "`Foo
\n`
\n<a title="a lot
\nof dashes"/>
\n",
+ "markdown": "`Foo\n----\n`\n\n\n",
+ "example": 60,
+ "start_line": 1140
+ },
+ {
+ "end_line": 1167,
+ "section": "Setext headings",
+ "html": "\nFoo
\n
\n
\n",
+ "markdown": "> Foo\n---\n",
+ "example": 61,
+ "start_line": 1159
+ },
+ {
+ "end_line": 1180,
+ "section": "Setext headings",
+ "html": "\nfoo\nbar\n===
\n
\n",
+ "markdown": "> foo\nbar\n===\n",
+ "example": 62,
+ "start_line": 1170
+ },
+ {
+ "end_line": 1191,
+ "section": "Setext headings",
+ "html": "\n- Foo
\n
\n
\n",
+ "markdown": "- Foo\n---\n",
+ "example": 63,
+ "start_line": 1183
+ },
+ {
+ "end_line": 1205,
+ "section": "Setext headings",
+ "html": "Foo\nBar
\n",
+ "markdown": "Foo\nBar\n---\n",
+ "example": 64,
+ "start_line": 1198
+ },
+ {
+ "end_line": 1223,
+ "section": "Setext headings",
+ "html": "
\nFoo
\nBar
\nBaz
\n",
+ "markdown": "---\nFoo\n---\nBar\n---\nBaz\n",
+ "example": 65,
+ "start_line": 1211
+ },
+ {
+ "end_line": 1233,
+ "section": "Setext headings",
+ "html": "====
\n",
+ "markdown": "\n====\n",
+ "example": 66,
+ "start_line": 1228
+ },
+ {
+ "end_line": 1246,
+ "section": "Setext headings",
+ "html": "
\n
\n",
+ "markdown": "---\n---\n",
+ "example": 67,
+ "start_line": 1240
+ },
+ {
+ "end_line": 1257,
+ "section": "Setext headings",
+ "html": "\n- foo
\n
\n
\n",
+ "markdown": "- foo\n-----\n",
+ "example": 68,
+ "start_line": 1249
+ },
+ {
+ "end_line": 1267,
+ "section": "Setext headings",
+ "html": "foo\n
\n
\n",
+ "markdown": " foo\n---\n",
+ "example": 69,
+ "start_line": 1260
+ },
+ {
+ "end_line": 1278,
+ "section": "Setext headings",
+ "html": "\nfoo
\n
\n
\n",
+ "markdown": "> foo\n-----\n",
+ "example": 70,
+ "start_line": 1270
+ },
+ {
+ "end_line": 1289,
+ "section": "Setext headings",
+ "html": "> foo
\n",
+ "markdown": "\\> foo\n------\n",
+ "example": 71,
+ "start_line": 1284
+ },
+ {
+ "end_line": 1325,
+ "section": "Setext headings",
+ "html": "Foo
\nbar
\nbaz
\n",
+ "markdown": "Foo\n\nbar\n---\nbaz\n",
+ "example": 72,
+ "start_line": 1315
+ },
+ {
+ "end_line": 1343,
+ "section": "Setext headings",
+ "html": "Foo\nbar
\n
\nbaz
\n",
+ "markdown": "Foo\nbar\n\n---\n\nbaz\n",
+ "example": 73,
+ "start_line": 1331
+ },
+ {
+ "end_line": 1359,
+ "section": "Setext headings",
+ "html": "Foo\nbar
\n
\nbaz
\n",
+ "markdown": "Foo\nbar\n* * *\nbaz\n",
+ "example": 74,
+ "start_line": 1349
+ },
+ {
+ "end_line": 1374,
+ "section": "Setext headings",
+ "html": "Foo\nbar\n---\nbaz
\n",
+ "markdown": "Foo\nbar\n\\---\nbaz\n",
+ "example": 75,
+ "start_line": 1364
+ },
+ {
+ "end_line": 1399,
+ "section": "Indented code blocks",
+ "html": "a simple\n indented code block\n
\n",
+ "markdown": " a simple\n indented code block\n",
+ "example": 76,
+ "start_line": 1392
+ },
+ {
+ "end_line": 1417,
+ "section": "Indented code blocks",
+ "html": "\n- \n
foo
\nbar
\n \n
\n",
+ "markdown": " - foo\n\n bar\n",
+ "example": 77,
+ "start_line": 1406
+ },
+ {
+ "end_line": 1433,
+ "section": "Indented code blocks",
+ "html": "\n- \n
foo
\n\n- bar
\n
\n \n
\n",
+ "markdown": "1. foo\n\n - bar\n",
+ "example": 78,
+ "start_line": 1420
+ },
+ {
+ "end_line": 1451,
+ "section": "Indented code blocks",
+ "html": "<a/>\n*hi*\n\n- one\n
\n",
+ "markdown": " \n *hi*\n\n - one\n",
+ "example": 79,
+ "start_line": 1440
+ },
+ {
+ "end_line": 1473,
+ "section": "Indented code blocks",
+ "html": "chunk1\n\nchunk2\n\n\n\nchunk3\n
\n",
+ "markdown": " chunk1\n\n chunk2\n \n \n \n chunk3\n",
+ "example": 80,
+ "start_line": 1456
+ },
+ {
+ "end_line": 1488,
+ "section": "Indented code blocks",
+ "html": "chunk1\n \n chunk2\n
\n",
+ "markdown": " chunk1\n \n chunk2\n",
+ "example": 81,
+ "start_line": 1479
+ },
+ {
+ "end_line": 1501,
+ "section": "Indented code blocks",
+ "html": "Foo\nbar
\n",
+ "markdown": "Foo\n bar\n\n",
+ "example": 82,
+ "start_line": 1494
+ },
+ {
+ "end_line": 1515,
+ "section": "Indented code blocks",
+ "html": "foo\n
\nbar
\n",
+ "markdown": " foo\nbar\n",
+ "example": 83,
+ "start_line": 1508
+ },
+ {
+ "end_line": 1536,
+ "section": "Indented code blocks",
+ "html": "Heading
\nfoo\n
\nHeading
\nfoo\n
\n
\n",
+ "markdown": "# Heading\n foo\nHeading\n------\n foo\n----\n",
+ "example": 84,
+ "start_line": 1521
+ },
+ {
+ "end_line": 1548,
+ "section": "Indented code blocks",
+ "html": " foo\nbar\n
\n",
+ "markdown": " foo\n bar\n",
+ "example": 85,
+ "start_line": 1541
+ },
+ {
+ "end_line": 1563,
+ "section": "Indented code blocks",
+ "html": "foo\n
\n",
+ "markdown": "\n \n foo\n \n\n",
+ "example": 86,
+ "start_line": 1554
+ },
+ {
+ "end_line": 1573,
+ "section": "Indented code blocks",
+ "html": "foo \n
\n",
+ "markdown": " foo \n",
+ "example": 87,
+ "start_line": 1568
+ },
+ {
+ "end_line": 1632,
+ "section": "Fenced code blocks",
+ "html": "<\n >\n
\n",
+ "markdown": "```\n<\n >\n```\n",
+ "example": 88,
+ "start_line": 1623
+ },
+ {
+ "end_line": 1646,
+ "section": "Fenced code blocks",
+ "html": "<\n >\n
\n",
+ "markdown": "~~~\n<\n >\n~~~\n",
+ "example": 89,
+ "start_line": 1637
+ },
+ {
+ "end_line": 1656,
+ "section": "Fenced code blocks",
+ "html": "foo
\n",
+ "markdown": "``\nfoo\n``\n",
+ "example": 90,
+ "start_line": 1650
+ },
+ {
+ "end_line": 1670,
+ "section": "Fenced code blocks",
+ "html": "aaa\n~~~\n
\n",
+ "markdown": "```\naaa\n~~~\n```\n",
+ "example": 91,
+ "start_line": 1661
+ },
+ {
+ "end_line": 1682,
+ "section": "Fenced code blocks",
+ "html": "aaa\n```\n
\n",
+ "markdown": "~~~\naaa\n```\n~~~\n",
+ "example": 92,
+ "start_line": 1673
+ },
+ {
+ "end_line": 1696,
+ "section": "Fenced code blocks",
+ "html": "aaa\n```\n
\n",
+ "markdown": "````\naaa\n```\n``````\n",
+ "example": 93,
+ "start_line": 1687
+ },
+ {
+ "end_line": 1708,
+ "section": "Fenced code blocks",
+ "html": "aaa\n~~~\n
\n",
+ "markdown": "~~~~\naaa\n~~~\n~~~~\n",
+ "example": 94,
+ "start_line": 1699
+ },
+ {
+ "end_line": 1718,
+ "section": "Fenced code blocks",
+ "html": "
\n",
+ "markdown": "```\n",
+ "example": 95,
+ "start_line": 1714
+ },
+ {
+ "end_line": 1731,
+ "section": "Fenced code blocks",
+ "html": "\n```\naaa\n
\n",
+ "markdown": "`````\n\n```\naaa\n",
+ "example": 96,
+ "start_line": 1721
+ },
+ {
+ "end_line": 1745,
+ "section": "Fenced code blocks",
+ "html": "\naaa\n
\n
\nbbb
\n",
+ "markdown": "> ```\n> aaa\n\nbbb\n",
+ "example": 97,
+ "start_line": 1734
+ },
+ {
+ "end_line": 1759,
+ "section": "Fenced code blocks",
+ "html": "\n \n
\n",
+ "markdown": "```\n\n \n```\n",
+ "example": 98,
+ "start_line": 1750
+ },
+ {
+ "end_line": 1769,
+ "section": "Fenced code blocks",
+ "html": "
\n",
+ "markdown": "```\n```\n",
+ "example": 99,
+ "start_line": 1764
+ },
+ {
+ "end_line": 1785,
+ "section": "Fenced code blocks",
+ "html": "aaa\naaa\n
\n",
+ "markdown": " ```\n aaa\naaa\n```\n",
+ "example": 100,
+ "start_line": 1776
+ },
+ {
+ "end_line": 1799,
+ "section": "Fenced code blocks",
+ "html": "aaa\naaa\naaa\n
\n",
+ "markdown": " ```\naaa\n aaa\naaa\n ```\n",
+ "example": 101,
+ "start_line": 1788
+ },
+ {
+ "end_line": 1813,
+ "section": "Fenced code blocks",
+ "html": "aaa\n aaa\naaa\n
\n",
+ "markdown": " ```\n aaa\n aaa\n aaa\n ```\n",
+ "example": 102,
+ "start_line": 1802
+ },
+ {
+ "end_line": 1827,
+ "section": "Fenced code blocks",
+ "html": "```\naaa\n```\n
\n",
+ "markdown": " ```\n aaa\n ```\n",
+ "example": 103,
+ "start_line": 1818
+ },
+ {
+ "end_line": 1840,
+ "section": "Fenced code blocks",
+ "html": "aaa\n
\n",
+ "markdown": "```\naaa\n ```\n",
+ "example": 104,
+ "start_line": 1833
+ },
+ {
+ "end_line": 1850,
+ "section": "Fenced code blocks",
+ "html": "aaa\n
\n",
+ "markdown": " ```\naaa\n ```\n",
+ "example": 105,
+ "start_line": 1843
+ },
+ {
+ "end_line": 1863,
+ "section": "Fenced code blocks",
+ "html": "aaa\n ```\n
\n",
+ "markdown": "```\naaa\n ```\n",
+ "example": 106,
+ "start_line": 1855
+ },
+ {
+ "end_line": 1875,
+ "section": "Fenced code blocks",
+ "html": "
\naaa
\n",
+ "markdown": "``` ```\naaa\n",
+ "example": 107,
+ "start_line": 1869
+ },
+ {
+ "end_line": 1886,
+ "section": "Fenced code blocks",
+ "html": "aaa\n~~~ ~~\n
\n",
+ "markdown": "~~~~~~\naaa\n~~~ ~~\n",
+ "example": 108,
+ "start_line": 1878
+ },
+ {
+ "end_line": 1903,
+ "section": "Fenced code blocks",
+ "html": "foo
\nbar\n
\nbaz
\n",
+ "markdown": "foo\n```\nbar\n```\nbaz\n",
+ "example": 109,
+ "start_line": 1892
+ },
+ {
+ "end_line": 1921,
+ "section": "Fenced code blocks",
+ "html": "foo
\nbar\n
\nbaz
\n",
+ "markdown": "foo\n---\n~~~\nbar\n~~~\n# baz\n",
+ "example": 110,
+ "start_line": 1909
+ },
+ {
+ "end_line": 1940,
+ "section": "Fenced code blocks",
+ "html": "def foo(x)\n return 3\nend\n
\n",
+ "markdown": "```ruby\ndef foo(x)\n return 3\nend\n```\n",
+ "example": 111,
+ "start_line": 1929
+ },
+ {
+ "end_line": 1954,
+ "section": "Fenced code blocks",
+ "html": "def foo(x)\n return 3\nend\n
\n",
+ "markdown": "~~~~ ruby startline=3 $%@#$\ndef foo(x)\n return 3\nend\n~~~~~~~\n",
+ "example": 112,
+ "start_line": 1943
+ },
+ {
+ "end_line": 1962,
+ "section": "Fenced code blocks",
+ "html": "
\n",
+ "markdown": "````;\n````\n",
+ "example": 113,
+ "start_line": 1957
+ },
+ {
+ "end_line": 1973,
+ "section": "Fenced code blocks",
+ "html": "aa
\nfoo
\n",
+ "markdown": "``` aa ```\nfoo\n",
+ "example": 114,
+ "start_line": 1967
+ },
+ {
+ "end_line": 1985,
+ "section": "Fenced code blocks",
+ "html": "``` aaa\n
\n",
+ "markdown": "```\n``` aaa\n```\n",
+ "example": 115,
+ "start_line": 1978
+ },
+ {
+ "end_line": 2070,
+ "section": "HTML blocks",
+ "html": "\n\n**Hello**,\nworld.\n
\n
\n",
+ "markdown": "\n\n**Hello**,\n\n_world_.\n
\n
\n",
+ "example": 116,
+ "start_line": 2055
+ },
+ {
+ "end_line": 2103,
+ "section": "HTML blocks",
+ "html": "\n \n \n hi\n \n \n
\nokay.
\n",
+ "markdown": "\n \n \n hi\n \n \n
\n\nokay.\n",
+ "example": 117,
+ "start_line": 2084
+ },
+ {
+ "end_line": 2114,
+ "section": "HTML blocks",
+ "html": " \n *hello*\n \n",
+ "markdown": " \n*foo*\n",
+ "markdown": " \n*foo*\n",
+ "example": 119,
+ "start_line": 2119
+ },
+ {
+ "end_line": 2140,
+ "section": "HTML blocks",
+ "html": "\nMarkdown
\n\n",
+ "markdown": "\n\n*Markdown*\n\n\n",
+ "example": 120,
+ "start_line": 2130
+ },
+ {
+ "end_line": 2154,
+ "section": "HTML blocks",
+ "html": " \n",
+ "markdown": " \n",
+ "example": 121,
+ "start_line": 2146
+ },
+ {
+ "end_line": 2165,
+ "section": "HTML blocks",
+ "html": " \n",
+ "markdown": " \n",
+ "example": 122,
+ "start_line": 2157
+ },
+ {
+ "end_line": 2178,
+ "section": "HTML blocks",
+ "html": "\n*foo*\nbar
\n",
+ "markdown": "\n*foo*\n\n*bar*\n",
+ "example": 123,
+ "start_line": 2169
+ },
+ {
+ "end_line": 2191,
+ "section": "HTML blocks",
+ "html": "\n",
+ "markdown": "\n",
+ "example": 127,
+ "start_line": 2218
+ },
+ {
+ "end_line": 2233,
+ "section": "HTML blocks",
+ "html": "\nfoo\n
\n",
+ "markdown": "\nfoo\n
\n",
+ "example": 128,
+ "start_line": 2225
+ },
+ {
+ "end_line": 2252,
+ "section": "HTML blocks",
+ "html": "\n``` c\nint x = 33;\n```\n",
+ "markdown": "\n``` c\nint x = 33;\n```\n",
+ "example": 129,
+ "start_line": 2242
+ },
+ {
+ "end_line": 2267,
+ "section": "HTML blocks",
+ "html": "\n*bar*\n\n",
+ "markdown": "\n*bar*\n\n",
+ "example": 130,
+ "start_line": 2259
+ },
+ {
+ "end_line": 2280,
+ "section": "HTML blocks",
+ "html": "\n*bar*\n \n",
+ "markdown": "\n*bar*\n \n",
+ "example": 131,
+ "start_line": 2272
+ },
+ {
+ "end_line": 2291,
+ "section": "HTML blocks",
+ "html": "\n*bar*\n\n",
+ "markdown": "\n*bar*\n\n",
+ "example": 132,
+ "start_line": 2283
+ },
+ {
+ "end_line": 2300,
+ "section": "HTML blocks",
+ "html": "\n*bar*\n",
+ "markdown": "\n*bar*\n",
+ "example": 133,
+ "start_line": 2294
+ },
+ {
+ "end_line": 2317,
+ "section": "HTML blocks",
+ "html": "\n*foo*\n\n",
+ "markdown": "\n*foo*\n\n",
+ "example": 134,
+ "start_line": 2309
+ },
+ {
+ "end_line": 2334,
+ "section": "HTML blocks",
+ "html": "\nfoo
\n\n",
+ "markdown": "\n\n*foo*\n\n\n",
+ "example": 135,
+ "start_line": 2324
+ },
+ {
+ "end_line": 2346,
+ "section": "HTML blocks",
+ "html": "foo
\n",
+ "markdown": "*foo*\n",
+ "example": 136,
+ "start_line": 2342
+ },
+ {
+ "end_line": 2374,
+ "section": "HTML blocks",
+ "html": "\nimport Text.HTML.TagSoup\n\nmain :: IO ()\nmain = print $ parseTags tags\n
\nokay
\n",
+ "markdown": "\nimport Text.HTML.TagSoup\n\nmain :: IO ()\nmain = print $ parseTags tags\n
\nokay\n",
+ "example": 137,
+ "start_line": 2358
+ },
+ {
+ "end_line": 2393,
+ "section": "HTML blocks",
+ "html": "\nokay
\n",
+ "markdown": "\nokay\n",
+ "example": 138,
+ "start_line": 2379
+ },
+ {
+ "end_line": 2414,
+ "section": "HTML blocks",
+ "html": "\nokay
\n",
+ "markdown": "\nokay\n",
+ "example": 139,
+ "start_line": 2398
+ },
+ {
+ "end_line": 2431,
+ "section": "HTML blocks",
+ "html": "\nfoo
\n",
+ "markdown": "\n*foo*\n",
+ "example": 143,
+ "start_line": 2463
+ },
+ {
+ "end_line": 2478,
+ "section": "HTML blocks",
+ "html": "*bar*\nbaz
\n",
+ "markdown": "*bar*\n*baz*\n",
+ "example": 144,
+ "start_line": 2472
+ },
+ {
+ "end_line": 2492,
+ "section": "HTML blocks",
+ "html": "1. *bar*\n",
+ "markdown": "1. *bar*\n",
+ "example": 145,
+ "start_line": 2484
+ },
+ {
+ "end_line": 2509,
+ "section": "HTML blocks",
+ "html": "\nokay
\n",
+ "markdown": "\nokay\n",
+ "example": 146,
+ "start_line": 2497
+ },
+ {
+ "end_line": 2529,
+ "section": "HTML blocks",
+ "html": "';\n\n?>\nokay
\n",
+ "markdown": "';\n\n?>\nokay\n",
+ "example": 147,
+ "start_line": 2515
+ },
+ {
+ "end_line": 2538,
+ "section": "HTML blocks",
+ "html": "\n",
+ "markdown": "\n",
+ "example": 148,
+ "start_line": 2534
+ },
+ {
+ "end_line": 2571,
+ "section": "HTML blocks",
+ "html": "\nokay
\n",
+ "markdown": "\nokay\n",
+ "example": 149,
+ "start_line": 2543
+ },
+ {
+ "end_line": 2584,
+ "section": "HTML blocks",
+ "html": " \n<!-- foo -->\n
\n",
+ "markdown": " \n\n \n",
+ "example": 150,
+ "start_line": 2576
+ },
+ {
+ "end_line": 2595,
+ "section": "HTML blocks",
+ "html": " \n<div>\n
\n",
+ "markdown": " \n\n \n",
+ "example": 151,
+ "start_line": 2587
+ },
+ {
+ "end_line": 2611,
+ "section": "HTML blocks",
+ "html": "Foo
\n\nbar\n\n",
+ "markdown": "Foo\n\nbar\n\n",
+ "example": 152,
+ "start_line": 2601
+ },
+ {
+ "end_line": 2627,
+ "section": "HTML blocks",
+ "html": "\nbar\n\n*foo*\n",
+ "markdown": "\nbar\n\n*foo*\n",
+ "example": 153,
+ "start_line": 2617
+ },
+ {
+ "end_line": 2640,
+ "section": "HTML blocks",
+ "html": "Foo\n\nbaz
\n",
+ "markdown": "Foo\n\nbaz\n",
+ "example": 154,
+ "start_line": 2632
+ },
+ {
+ "end_line": 2683,
+ "section": "HTML blocks",
+ "html": "\nEmphasized text.
\n\n",
+ "markdown": "\n\n*Emphasized* text.\n\n\n",
+ "example": 155,
+ "start_line": 2673
+ },
+ {
+ "end_line": 2694,
+ "section": "HTML blocks",
+ "html": "\n*Emphasized* text.\n\n",
+ "markdown": "\n*Emphasized* text.\n\n",
+ "example": 156,
+ "start_line": 2686
+ },
+ {
+ "end_line": 2728,
+ "section": "HTML blocks",
+ "html": "\n\n\nHi\n \n \n
\n",
+ "markdown": "\n\n\n\n\nHi\n \n\n \n\n
\n",
+ "example": 157,
+ "start_line": 2708
+ },
+ {
+ "end_line": 2756,
+ "section": "HTML blocks",
+ "html": "\n \n<td>\n Hi\n</td>\n
\n \n
\n",
+ "markdown": "\n\n \n\n \n Hi\n \n\n \n\n
\n",
+ "example": 158,
+ "start_line": 2735
+ },
+ {
+ "end_line": 2789,
+ "section": "Link reference definitions",
+ "html": "\n",
+ "markdown": "[foo]: /url \"title\"\n\n[foo]\n",
+ "example": 159,
+ "start_line": 2783
+ },
+ {
+ "end_line": 2800,
+ "section": "Link reference definitions",
+ "html": "\n",
+ "markdown": " [foo]: \n /url \n 'the title' \n\n[foo]\n",
+ "example": 160,
+ "start_line": 2792
+ },
+ {
+ "end_line": 2809,
+ "section": "Link reference definitions",
+ "html": "\n",
+ "markdown": "[Foo*bar\\]]:my_(url) 'title (with parens)'\n\n[Foo*bar\\]]\n",
+ "example": 161,
+ "start_line": 2803
+ },
+ {
+ "end_line": 2820,
+ "section": "Link reference definitions",
+ "html": "\n",
+ "markdown": "[Foo bar]:\n\n'title'\n\n[Foo bar]\n",
+ "example": 162,
+ "start_line": 2812
+ },
+ {
+ "end_line": 2839,
+ "section": "Link reference definitions",
+ "html": "\n",
+ "markdown": "[foo]: /url '\ntitle\nline1\nline2\n'\n\n[foo]\n",
+ "example": 163,
+ "start_line": 2825
+ },
+ {
+ "end_line": 2854,
+ "section": "Link reference definitions",
+ "html": "[foo]: /url 'title
\nwith blank line'
\n[foo]
\n",
+ "markdown": "[foo]: /url 'title\n\nwith blank line'\n\n[foo]\n",
+ "example": 164,
+ "start_line": 2844
+ },
+ {
+ "end_line": 2866,
+ "section": "Link reference definitions",
+ "html": "\n",
+ "markdown": "[foo]:\n/url\n\n[foo]\n",
+ "example": 165,
+ "start_line": 2859
+ },
+ {
+ "end_line": 2878,
+ "section": "Link reference definitions",
+ "html": "[foo]:
\n[foo]
\n",
+ "markdown": "[foo]:\n\n[foo]\n",
+ "example": 166,
+ "start_line": 2871
+ },
+ {
+ "end_line": 2890,
+ "section": "Link reference definitions",
+ "html": "\n",
+ "markdown": "[foo]: /url\\bar\\*baz \"foo\\\"bar\\baz\"\n\n[foo]\n",
+ "example": 167,
+ "start_line": 2884
+ },
+ {
+ "end_line": 2901,
+ "section": "Link reference definitions",
+ "html": "\n",
+ "markdown": "[foo]\n\n[foo]: url\n",
+ "example": 168,
+ "start_line": 2895
+ },
+ {
+ "end_line": 2914,
+ "section": "Link reference definitions",
+ "html": "\n",
+ "markdown": "[foo]\n\n[foo]: first\n[foo]: second\n",
+ "example": 169,
+ "start_line": 2907
+ },
+ {
+ "end_line": 2926,
+ "section": "Link reference definitions",
+ "html": "\n",
+ "markdown": "[FOO]: /url\n\n[Foo]\n",
+ "example": 170,
+ "start_line": 2920
+ },
+ {
+ "end_line": 2935,
+ "section": "Link reference definitions",
+ "html": "\n",
+ "markdown": "[ΑΓΩ]: /φου\n\n[αγω]\n",
+ "example": 171,
+ "start_line": 2929
+ },
+ {
+ "end_line": 2944,
+ "section": "Link reference definitions",
+ "html": "",
+ "markdown": "[foo]: /url\n",
+ "example": 172,
+ "start_line": 2941
+ },
+ {
+ "end_line": 2956,
+ "section": "Link reference definitions",
+ "html": "bar
\n",
+ "markdown": "[\nfoo\n]: /url\nbar\n",
+ "example": 173,
+ "start_line": 2949
+ },
+ {
+ "end_line": 2966,
+ "section": "Link reference definitions",
+ "html": "[foo]: /url "title" ok
\n",
+ "markdown": "[foo]: /url \"title\" ok\n",
+ "example": 174,
+ "start_line": 2962
+ },
+ {
+ "end_line": 2976,
+ "section": "Link reference definitions",
+ "html": ""title" ok
\n",
+ "markdown": "[foo]: /url\n\"title\" ok\n",
+ "example": 175,
+ "start_line": 2971
+ },
+ {
+ "end_line": 2990,
+ "section": "Link reference definitions",
+ "html": "[foo]: /url "title"\n
\n[foo]
\n",
+ "markdown": " [foo]: /url \"title\"\n\n[foo]\n",
+ "example": 176,
+ "start_line": 2982
+ },
+ {
+ "end_line": 3006,
+ "section": "Link reference definitions",
+ "html": "[foo]: /url\n
\n[foo]
\n",
+ "markdown": "```\n[foo]: /url\n```\n\n[foo]\n",
+ "example": 177,
+ "start_line": 2996
+ },
+ {
+ "end_line": 3020,
+ "section": "Link reference definitions",
+ "html": "Foo\n[bar]: /baz
\n[bar]
\n",
+ "markdown": "Foo\n[bar]: /baz\n\n[bar]\n",
+ "example": 178,
+ "start_line": 3011
+ },
+ {
+ "end_line": 3035,
+ "section": "Link reference definitions",
+ "html": "Foo
\n\nbar
\n
\n",
+ "markdown": "# [Foo]\n[foo]: /url\n> bar\n",
+ "example": 179,
+ "start_line": 3026
+ },
+ {
+ "end_line": 3054,
+ "section": "Link reference definitions",
+ "html": "\n",
+ "markdown": "[foo]: /foo-url \"foo\"\n[bar]: /bar-url\n \"bar\"\n[baz]: /baz-url\n\n[foo],\n[bar],\n[baz]\n",
+ "example": 180,
+ "start_line": 3041
+ },
+ {
+ "end_line": 3070,
+ "section": "Link reference definitions",
+ "html": "\n\n
\n",
+ "markdown": "[foo]\n\n> [foo]: /url\n",
+ "example": 181,
+ "start_line": 3062
+ },
+ {
+ "end_line": 3092,
+ "section": "Paragraphs",
+ "html": "aaa
\nbbb
\n",
+ "markdown": "aaa\n\nbbb\n",
+ "example": 182,
+ "start_line": 3085
+ },
+ {
+ "end_line": 3108,
+ "section": "Paragraphs",
+ "html": "aaa\nbbb
\nccc\nddd
\n",
+ "markdown": "aaa\nbbb\n\nccc\nddd\n",
+ "example": 183,
+ "start_line": 3097
+ },
+ {
+ "end_line": 3121,
+ "section": "Paragraphs",
+ "html": "aaa
\nbbb
\n",
+ "markdown": "aaa\n\n\nbbb\n",
+ "example": 184,
+ "start_line": 3113
+ },
+ {
+ "end_line": 3132,
+ "section": "Paragraphs",
+ "html": "aaa\nbbb
\n",
+ "markdown": " aaa\n bbb\n",
+ "example": 185,
+ "start_line": 3126
+ },
+ {
+ "end_line": 3146,
+ "section": "Paragraphs",
+ "html": "aaa\nbbb\nccc
\n",
+ "markdown": "aaa\n bbb\n ccc\n",
+ "example": 186,
+ "start_line": 3138
+ },
+ {
+ "end_line": 3158,
+ "section": "Paragraphs",
+ "html": "aaa\nbbb
\n",
+ "markdown": " aaa\nbbb\n",
+ "example": 187,
+ "start_line": 3152
+ },
+ {
+ "end_line": 3168,
+ "section": "Paragraphs",
+ "html": "aaa\n
\nbbb
\n",
+ "markdown": " aaa\nbbb\n",
+ "example": 188,
+ "start_line": 3161
+ },
+ {
+ "end_line": 3181,
+ "section": "Paragraphs",
+ "html": "aaa
\nbbb
\n",
+ "markdown": "aaa \nbbb \n",
+ "example": 189,
+ "start_line": 3175
+ },
+ {
+ "end_line": 3204,
+ "section": "Blank lines",
+ "html": "aaa
\naaa
\n",
+ "markdown": " \n\naaa\n \n\n# aaa\n\n \n",
+ "example": 190,
+ "start_line": 3192
+ },
+ {
+ "end_line": 3268,
+ "section": "Block quotes",
+ "html": "\nFoo
\nbar\nbaz
\n
\n",
+ "markdown": "> # Foo\n> bar\n> baz\n",
+ "example": 191,
+ "start_line": 3258
+ },
+ {
+ "end_line": 3283,
+ "section": "Block quotes",
+ "html": "\nFoo
\nbar\nbaz
\n
\n",
+ "markdown": "># Foo\n>bar\n> baz\n",
+ "example": 192,
+ "start_line": 3273
+ },
+ {
+ "end_line": 3298,
+ "section": "Block quotes",
+ "html": "\nFoo
\nbar\nbaz
\n
\n",
+ "markdown": " > # Foo\n > bar\n > baz\n",
+ "example": 193,
+ "start_line": 3288
+ },
+ {
+ "end_line": 3312,
+ "section": "Block quotes",
+ "html": "> # Foo\n> bar\n> baz\n
\n",
+ "markdown": " > # Foo\n > bar\n > baz\n",
+ "example": 194,
+ "start_line": 3303
+ },
+ {
+ "end_line": 3328,
+ "section": "Block quotes",
+ "html": "\nFoo
\nbar\nbaz
\n
\n",
+ "markdown": "> # Foo\n> bar\nbaz\n",
+ "example": 195,
+ "start_line": 3318
+ },
+ {
+ "end_line": 3344,
+ "section": "Block quotes",
+ "html": "\nbar\nbaz\nfoo
\n
\n",
+ "markdown": "> bar\nbaz\n> foo\n",
+ "example": 196,
+ "start_line": 3334
+ },
+ {
+ "end_line": 3366,
+ "section": "Block quotes",
+ "html": "\nfoo
\n
\n
\n",
+ "markdown": "> foo\n---\n",
+ "example": 197,
+ "start_line": 3358
+ },
+ {
+ "end_line": 3390,
+ "section": "Block quotes",
+ "html": "\n\n- foo
\n
\n
\n\n- bar
\n
\n",
+ "markdown": "> - foo\n- bar\n",
+ "example": 198,
+ "start_line": 3378
+ },
+ {
+ "end_line": 3406,
+ "section": "Block quotes",
+ "html": "\nfoo\n
\n
\nbar\n
\n",
+ "markdown": "> foo\n bar\n",
+ "example": 199,
+ "start_line": 3396
+ },
+ {
+ "end_line": 3419,
+ "section": "Block quotes",
+ "html": "\n
\n
\nfoo
\n
\n",
+ "markdown": "> ```\nfoo\n```\n",
+ "example": 200,
+ "start_line": 3409
+ },
+ {
+ "end_line": 3433,
+ "section": "Block quotes",
+ "html": "\nfoo\n- bar
\n
\n",
+ "markdown": "> foo\n - bar\n",
+ "example": 201,
+ "start_line": 3425
+ },
+ {
+ "end_line": 3454,
+ "section": "Block quotes",
+ "html": "\n
\n",
+ "markdown": ">\n",
+ "example": 202,
+ "start_line": 3449
+ },
+ {
+ "end_line": 3464,
+ "section": "Block quotes",
+ "html": "\n
\n",
+ "markdown": ">\n> \n> \n",
+ "example": 203,
+ "start_line": 3457
+ },
+ {
+ "end_line": 3477,
+ "section": "Block quotes",
+ "html": "\nfoo
\n
\n",
+ "markdown": ">\n> foo\n> \n",
+ "example": 204,
+ "start_line": 3469
+ },
+ {
+ "end_line": 3493,
+ "section": "Block quotes",
+ "html": "\nfoo
\n
\n\nbar
\n
\n",
+ "markdown": "> foo\n\n> bar\n",
+ "example": 205,
+ "start_line": 3482
+ },
+ {
+ "end_line": 3512,
+ "section": "Block quotes",
+ "html": "\nfoo\nbar
\n
\n",
+ "markdown": "> foo\n> bar\n",
+ "example": 206,
+ "start_line": 3504
+ },
+ {
+ "end_line": 3526,
+ "section": "Block quotes",
+ "html": "\nfoo
\nbar
\n
\n",
+ "markdown": "> foo\n>\n> bar\n",
+ "example": 207,
+ "start_line": 3517
+ },
+ {
+ "end_line": 3539,
+ "section": "Block quotes",
+ "html": "foo
\n\nbar
\n
\n",
+ "markdown": "foo\n> bar\n",
+ "example": 208,
+ "start_line": 3531
+ },
+ {
+ "end_line": 3557,
+ "section": "Block quotes",
+ "html": "\naaa
\n
\n
\n\nbbb
\n
\n",
+ "markdown": "> aaa\n***\n> bbb\n",
+ "example": 209,
+ "start_line": 3545
+ },
+ {
+ "end_line": 3571,
+ "section": "Block quotes",
+ "html": "\nbar\nbaz
\n
\n",
+ "markdown": "> bar\nbaz\n",
+ "example": 210,
+ "start_line": 3563
+ },
+ {
+ "end_line": 3583,
+ "section": "Block quotes",
+ "html": "\nbar
\n
\nbaz
\n",
+ "markdown": "> bar\n\nbaz\n",
+ "example": 211,
+ "start_line": 3574
+ },
+ {
+ "end_line": 3595,
+ "section": "Block quotes",
+ "html": "\nbar
\n
\nbaz
\n",
+ "markdown": "> bar\n>\nbaz\n",
+ "example": 212,
+ "start_line": 3586
+ },
+ {
+ "end_line": 3614,
+ "section": "Block quotes",
+ "html": "\n\n\nfoo\nbar
\n
\n
\n
\n",
+ "markdown": "> > > foo\nbar\n",
+ "example": 213,
+ "start_line": 3602
+ },
+ {
+ "end_line": 3631,
+ "section": "Block quotes",
+ "html": "\n\n\nfoo\nbar\nbaz
\n
\n
\n
\n",
+ "markdown": ">>> foo\n> bar\n>>baz\n",
+ "example": 214,
+ "start_line": 3617
+ },
+ {
+ "end_line": 3651,
+ "section": "Block quotes",
+ "html": "\ncode\n
\n
\n\nnot code
\n
\n",
+ "markdown": "> code\n\n> not code\n",
+ "example": 215,
+ "start_line": 3639
+ },
+ {
+ "end_line": 3709,
+ "section": "List items",
+ "html": "A paragraph\nwith two lines.
\nindented code\n
\n\nA block quote.
\n
\n",
+ "markdown": "A paragraph\nwith two lines.\n\n indented code\n\n> A block quote.\n",
+ "example": 216,
+ "start_line": 3694
+ },
+ {
+ "end_line": 3735,
+ "section": "List items",
+ "html": "\n- \n
A paragraph\nwith two lines.
\nindented code\n
\n\nA block quote.
\n
\n \n
\n",
+ "markdown": "1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n",
+ "example": 217,
+ "start_line": 3716
+ },
+ {
+ "end_line": 3758,
+ "section": "List items",
+ "html": "\n- one
\n
\ntwo
\n",
+ "markdown": "- one\n\n two\n",
+ "example": 218,
+ "start_line": 3749
+ },
+ {
+ "end_line": 3772,
+ "section": "List items",
+ "html": "\n- \n
one
\ntwo
\n \n
\n",
+ "markdown": "- one\n\n two\n",
+ "example": 219,
+ "start_line": 3761
+ },
+ {
+ "end_line": 3785,
+ "section": "List items",
+ "html": "\n- one
\n
\n two\n
\n",
+ "markdown": " - one\n\n two\n",
+ "example": 220,
+ "start_line": 3775
+ },
+ {
+ "end_line": 3799,
+ "section": "List items",
+ "html": "\n- \n
one
\ntwo
\n \n
\n",
+ "markdown": " - one\n\n two\n",
+ "example": 221,
+ "start_line": 3788
+ },
+ {
+ "end_line": 3825,
+ "section": "List items",
+ "html": "\n\n\n- \n
one
\ntwo
\n \n
\n
\n
\n",
+ "markdown": " > > 1. one\n>>\n>> two\n",
+ "example": 222,
+ "start_line": 3810
+ },
+ {
+ "end_line": 3850,
+ "section": "List items",
+ "html": "\n\n\n- one
\n
\ntwo
\n
\n
\n",
+ "markdown": ">>- one\n>>\n > > two\n",
+ "example": 223,
+ "start_line": 3837
+ },
+ {
+ "end_line": 3863,
+ "section": "List items",
+ "html": "-one
\n2.two
\n",
+ "markdown": "-one\n\n2.two\n",
+ "example": 224,
+ "start_line": 3856
+ },
+ {
+ "end_line": 3881,
+ "section": "List items",
+ "html": "\n- \n
foo
\nbar
\n \n
\n",
+ "markdown": "- foo\n\n\n bar\n",
+ "example": 225,
+ "start_line": 3869
+ },
+ {
+ "end_line": 3908,
+ "section": "List items",
+ "html": "\n- \n
foo
\nbar\n
\nbaz
\n\nbam
\n
\n \n
\n",
+ "markdown": "1. foo\n\n ```\n bar\n ```\n\n baz\n\n > bam\n",
+ "example": 226,
+ "start_line": 3886
+ },
+ {
+ "end_line": 3932,
+ "section": "List items",
+ "html": "\n- \n
Foo
\nbar\n\n\nbaz\n
\n \n
\n",
+ "markdown": "- Foo\n\n bar\n\n\n baz\n",
+ "example": 227,
+ "start_line": 3914
+ },
+ {
+ "end_line": 3942,
+ "section": "List items",
+ "html": "\n- ok
\n
\n",
+ "markdown": "123456789. ok\n",
+ "example": 228,
+ "start_line": 3936
+ },
+ {
+ "end_line": 3949,
+ "section": "List items",
+ "html": "1234567890. not ok
\n",
+ "markdown": "1234567890. not ok\n",
+ "example": 229,
+ "start_line": 3945
+ },
+ {
+ "end_line": 3960,
+ "section": "List items",
+ "html": "\n- ok
\n
\n",
+ "markdown": "0. ok\n",
+ "example": 230,
+ "start_line": 3954
+ },
+ {
+ "end_line": 3969,
+ "section": "List items",
+ "html": "\n- ok
\n
\n",
+ "markdown": "003. ok\n",
+ "example": 231,
+ "start_line": 3963
+ },
+ {
+ "end_line": 3978,
+ "section": "List items",
+ "html": "-1. not ok
\n",
+ "markdown": "-1. not ok\n",
+ "example": 232,
+ "start_line": 3974
+ },
+ {
+ "end_line": 4010,
+ "section": "List items",
+ "html": "\n- \n
foo
\nbar\n
\n \n
\n",
+ "markdown": "- foo\n\n bar\n",
+ "example": 233,
+ "start_line": 3998
+ },
+ {
+ "end_line": 4027,
+ "section": "List items",
+ "html": "\n- \n
foo
\nbar\n
\n \n
\n",
+ "markdown": " 10. foo\n\n bar\n",
+ "example": 234,
+ "start_line": 4015
+ },
+ {
+ "end_line": 4046,
+ "section": "List items",
+ "html": "indented code\n
\nparagraph
\nmore code\n
\n",
+ "markdown": " indented code\n\nparagraph\n\n more code\n",
+ "example": 235,
+ "start_line": 4034
+ },
+ {
+ "end_line": 4065,
+ "section": "List items",
+ "html": "\n- \n
indented code\n
\nparagraph
\nmore code\n
\n \n
\n",
+ "markdown": "1. indented code\n\n paragraph\n\n more code\n",
+ "example": 236,
+ "start_line": 4049
+ },
+ {
+ "end_line": 4087,
+ "section": "List items",
+ "html": "\n- \n
indented code\n
\nparagraph
\nmore code\n
\n \n
\n",
+ "markdown": "1. indented code\n\n paragraph\n\n more code\n",
+ "example": 237,
+ "start_line": 4071
+ },
+ {
+ "end_line": 4105,
+ "section": "List items",
+ "html": "foo
\nbar
\n",
+ "markdown": " foo\n\nbar\n",
+ "example": 238,
+ "start_line": 4098
+ },
+ {
+ "end_line": 4117,
+ "section": "List items",
+ "html": "\n- foo
\n
\nbar
\n",
+ "markdown": "- foo\n\n bar\n",
+ "example": 239,
+ "start_line": 4108
+ },
+ {
+ "end_line": 4136,
+ "section": "List items",
+ "html": "\n- \n
foo
\nbar
\n \n
\n",
+ "markdown": "- foo\n\n bar\n",
+ "example": 240,
+ "start_line": 4125
+ },
+ {
+ "end_line": 4174,
+ "section": "List items",
+ "html": "\n- foo
\n- \n
bar\n
\n \n- \n
baz\n
\n \n
\n",
+ "markdown": "-\n foo\n-\n ```\n bar\n ```\n-\n baz\n",
+ "example": 241,
+ "start_line": 4153
+ },
+ {
+ "end_line": 4186,
+ "section": "List items",
+ "html": "\n- foo
\n
\n",
+ "markdown": "- \n foo\n",
+ "example": 242,
+ "start_line": 4179
+ },
+ {
+ "end_line": 4202,
+ "section": "List items",
+ "html": "\n\n
\nfoo
\n",
+ "markdown": "-\n\n foo\n",
+ "example": 243,
+ "start_line": 4193
+ },
+ {
+ "end_line": 4217,
+ "section": "List items",
+ "html": "\n- foo
\n\n- bar
\n
\n",
+ "markdown": "- foo\n-\n- bar\n",
+ "example": 244,
+ "start_line": 4207
+ },
+ {
+ "end_line": 4232,
+ "section": "List items",
+ "html": "\n- foo
\n\n- bar
\n
\n",
+ "markdown": "- foo\n- \n- bar\n",
+ "example": 245,
+ "start_line": 4222
+ },
+ {
+ "end_line": 4247,
+ "section": "List items",
+ "html": "\n- foo
\n\n- bar
\n
\n",
+ "markdown": "1. foo\n2.\n3. bar\n",
+ "example": 246,
+ "start_line": 4237
+ },
+ {
+ "end_line": 4258,
+ "section": "List items",
+ "html": "\n\n
\n",
+ "markdown": "*\n",
+ "example": 247,
+ "start_line": 4252
+ },
+ {
+ "end_line": 4273,
+ "section": "List items",
+ "html": "foo\n*
\nfoo\n1.
\n",
+ "markdown": "foo\n*\n\nfoo\n1.\n",
+ "example": 248,
+ "start_line": 4262
+ },
+ {
+ "end_line": 4303,
+ "section": "List items",
+ "html": "\n- \n
A paragraph\nwith two lines.
\nindented code\n
\n\nA block quote.
\n
\n \n
\n",
+ "markdown": " 1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n",
+ "example": 249,
+ "start_line": 4284
+ },
+ {
+ "end_line": 4327,
+ "section": "List items",
+ "html": "\n- \n
A paragraph\nwith two lines.
\nindented code\n
\n\nA block quote.
\n
\n \n
\n",
+ "markdown": " 1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n",
+ "example": 250,
+ "start_line": 4308
+ },
+ {
+ "end_line": 4351,
+ "section": "List items",
+ "html": "\n- \n
A paragraph\nwith two lines.
\nindented code\n
\n\nA block quote.
\n
\n \n
\n",
+ "markdown": " 1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n",
+ "example": 251,
+ "start_line": 4332
+ },
+ {
+ "end_line": 4371,
+ "section": "List items",
+ "html": "1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n
\n",
+ "markdown": " 1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n",
+ "example": 252,
+ "start_line": 4356
+ },
+ {
+ "end_line": 4405,
+ "section": "List items",
+ "html": "\n- \n
A paragraph\nwith two lines.
\nindented code\n
\n\nA block quote.
\n
\n \n
\n",
+ "markdown": " 1. A paragraph\nwith two lines.\n\n indented code\n\n > A block quote.\n",
+ "example": 253,
+ "start_line": 4386
+ },
+ {
+ "end_line": 4418,
+ "section": "List items",
+ "html": "\n- A paragraph\nwith two lines.
\n
\n",
+ "markdown": " 1. A paragraph\n with two lines.\n",
+ "example": 254,
+ "start_line": 4410
+ },
+ {
+ "end_line": 4437,
+ "section": "List items",
+ "html": "\n\n- \n
\nBlockquote\ncontinued here.
\n
\n \n
\n
\n",
+ "markdown": "> 1. > Blockquote\ncontinued here.\n",
+ "example": 255,
+ "start_line": 4423
+ },
+ {
+ "end_line": 4454,
+ "section": "List items",
+ "html": "\n\n- \n
\nBlockquote\ncontinued here.
\n
\n \n
\n
\n",
+ "markdown": "> 1. > Blockquote\n> continued here.\n",
+ "example": 256,
+ "start_line": 4440
+ },
+ {
+ "end_line": 4488,
+ "section": "List items",
+ "html": "\n- foo\n
\n- bar\n
\n- baz\n
\n- boo
\n
\n \n
\n \n
\n \n
\n",
+ "markdown": "- foo\n - bar\n - baz\n - boo\n",
+ "example": 257,
+ "start_line": 4467
+ },
+ {
+ "end_line": 4505,
+ "section": "List items",
+ "html": "\n- foo
\n- bar
\n- baz
\n- boo
\n
\n",
+ "markdown": "- foo\n - bar\n - baz\n - boo\n",
+ "example": 258,
+ "start_line": 4493
+ },
+ {
+ "end_line": 4521,
+ "section": "List items",
+ "html": "\n- foo\n
\n- bar
\n
\n \n
\n",
+ "markdown": "10) foo\n - bar\n",
+ "example": 259,
+ "start_line": 4510
+ },
+ {
+ "end_line": 4536,
+ "section": "List items",
+ "html": "\n- foo
\n
\n\n- bar
\n
\n",
+ "markdown": "10) foo\n - bar\n",
+ "example": 260,
+ "start_line": 4526
+ },
+ {
+ "end_line": 4551,
+ "section": "List items",
+ "html": "\n- \n
\n- foo
\n
\n \n
\n",
+ "markdown": "- - foo\n",
+ "example": 261,
+ "start_line": 4541
+ },
+ {
+ "end_line": 4568,
+ "section": "List items",
+ "html": "\n- \n
\n- \n
\n- foo
\n
\n \n
\n \n
\n",
+ "markdown": "1. - 2. foo\n",
+ "example": 262,
+ "start_line": 4554
+ },
+ {
+ "end_line": 4587,
+ "section": "List items",
+ "html": "\n- \n
Foo
\n \n- \n
Bar
\nbaz \n
\n",
+ "markdown": "- # Foo\n- Bar\n ---\n baz\n",
+ "example": 263,
+ "start_line": 4573
+ },
+ {
+ "end_line": 4821,
+ "section": "Lists",
+ "html": "\n- foo
\n- bar
\n
\n\n- baz
\n
\n",
+ "markdown": "- foo\n- bar\n+ baz\n",
+ "example": 264,
+ "start_line": 4809
+ },
+ {
+ "end_line": 4836,
+ "section": "Lists",
+ "html": "\n- foo
\n- bar
\n
\n\n- baz
\n
\n",
+ "markdown": "1. foo\n2. bar\n3) baz\n",
+ "example": 265,
+ "start_line": 4824
+ },
+ {
+ "end_line": 4853,
+ "section": "Lists",
+ "html": "Foo
\n\n- bar
\n- baz
\n
\n",
+ "markdown": "Foo\n- bar\n- baz\n",
+ "example": 266,
+ "start_line": 4843
+ },
+ {
+ "end_line": 4926,
+ "section": "Lists",
+ "html": "The number of windows in my house is\n14. The number of doors is 6.
\n",
+ "markdown": "The number of windows in my house is\n14. The number of doors is 6.\n",
+ "example": 267,
+ "start_line": 4920
+ },
+ {
+ "end_line": 4938,
+ "section": "Lists",
+ "html": "The number of windows in my house is
\n\n- The number of doors is 6.
\n
\n",
+ "markdown": "The number of windows in my house is\n1. The number of doors is 6.\n",
+ "example": 268,
+ "start_line": 4930
+ },
+ {
+ "end_line": 4963,
+ "section": "Lists",
+ "html": "\n- \n
foo
\n \n- \n
bar
\n \n- \n
baz
\n \n
\n",
+ "markdown": "- foo\n\n- bar\n\n\n- baz\n",
+ "example": 269,
+ "start_line": 4944
+ },
+ {
+ "end_line": 4987,
+ "section": "Lists",
+ "html": "\n- foo\n
\n- bar\n
\n- \n
baz
\nbim
\n \n
\n \n
\n \n
\n",
+ "markdown": "- foo\n - bar\n - baz\n\n\n bim\n",
+ "example": 270,
+ "start_line": 4965
+ },
+ {
+ "end_line": 5013,
+ "section": "Lists",
+ "html": "\n- foo
\n- bar
\n
\n\n\n- baz
\n- bim
\n
\n",
+ "markdown": "- foo\n- bar\n\n\n\n- baz\n- bim\n",
+ "example": 271,
+ "start_line": 4995
+ },
+ {
+ "end_line": 5039,
+ "section": "Lists",
+ "html": "\n- \n
foo
\nnotcode
\n \n- \n
foo
\n \n
\n\ncode\n
\n",
+ "markdown": "- foo\n\n notcode\n\n- foo\n\n\n\n code\n",
+ "example": 272,
+ "start_line": 5016
+ },
+ {
+ "end_line": 5069,
+ "section": "Lists",
+ "html": "\n- a
\n- b
\n- c
\n- d
\n- e
\n- f
\n- g
\n- h
\n- i
\n
\n",
+ "markdown": "- a\n - b\n - c\n - d\n - e\n - f\n - g\n - h\n- i\n",
+ "example": 273,
+ "start_line": 5047
+ },
+ {
+ "end_line": 5090,
+ "section": "Lists",
+ "html": "\n- \n
a
\n \n- \n
b
\n \n- \n
c
\n \n
\n",
+ "markdown": "1. a\n\n 2. b\n\n 3. c\n",
+ "example": 274,
+ "start_line": 5072
+ },
+ {
+ "end_line": 5113,
+ "section": "Lists",
+ "html": "\n- \n
a
\n \n- \n
b
\n \n- \n
c
\n \n
\n",
+ "markdown": "- a\n- b\n\n- c\n",
+ "example": 275,
+ "start_line": 5096
+ },
+ {
+ "end_line": 5133,
+ "section": "Lists",
+ "html": "\n- \n
a
\n \n\n- \n
c
\n \n
\n",
+ "markdown": "* a\n*\n\n* c\n",
+ "example": 276,
+ "start_line": 5118
+ },
+ {
+ "end_line": 5159,
+ "section": "Lists",
+ "html": "\n- \n
a
\n \n- \n
b
\nc
\n \n- \n
d
\n \n
\n",
+ "markdown": "- a\n- b\n\n c\n- d\n",
+ "example": 277,
+ "start_line": 5140
+ },
+ {
+ "end_line": 5180,
+ "section": "Lists",
+ "html": "\n- \n
a
\n \n- \n
b
\n \n- \n
d
\n \n
\n",
+ "markdown": "- a\n- b\n\n [ref]: /url\n- d\n",
+ "example": 278,
+ "start_line": 5162
+ },
+ {
+ "end_line": 5204,
+ "section": "Lists",
+ "html": "\n- a
\n- \n
b\n\n\n
\n \n- c
\n
\n",
+ "markdown": "- a\n- ```\n b\n\n\n ```\n- c\n",
+ "example": 279,
+ "start_line": 5185
+ },
+ {
+ "end_line": 5229,
+ "section": "Lists",
+ "html": "\n- a\n
\n- \n
b
\nc
\n \n
\n \n- d
\n
\n",
+ "markdown": "- a\n - b\n\n c\n- d\n",
+ "example": 280,
+ "start_line": 5211
+ },
+ {
+ "end_line": 5249,
+ "section": "Lists",
+ "html": "\n- a\n
\nb
\n
\n \n- c
\n
\n",
+ "markdown": "* a\n > b\n >\n* c\n",
+ "example": 281,
+ "start_line": 5235
+ },
+ {
+ "end_line": 5273,
+ "section": "Lists",
+ "html": "\n- a\n
\nb
\n
\nc\n
\n \n- d
\n
\n",
+ "markdown": "- a\n > b\n ```\n c\n ```\n- d\n",
+ "example": 282,
+ "start_line": 5255
+ },
+ {
+ "end_line": 5284,
+ "section": "Lists",
+ "html": "\n- a
\n
\n",
+ "markdown": "- a\n",
+ "example": 283,
+ "start_line": 5278
+ },
+ {
+ "end_line": 5298,
+ "section": "Lists",
+ "html": "\n- a\n
\n- b
\n
\n \n
\n",
+ "markdown": "- a\n - b\n",
+ "example": 284,
+ "start_line": 5287
+ },
+ {
+ "end_line": 5318,
+ "section": "Lists",
+ "html": "\n- \n
foo\n
\nbar
\n \n
\n",
+ "markdown": "1. ```\n foo\n ```\n\n bar\n",
+ "example": 285,
+ "start_line": 5304
+ },
+ {
+ "end_line": 5338,
+ "section": "Lists",
+ "html": "\n- \n
foo
\n\n- bar
\n
\nbaz
\n \n
\n",
+ "markdown": "* foo\n * bar\n\n baz\n",
+ "example": 286,
+ "start_line": 5323
+ },
+ {
+ "end_line": 5366,
+ "section": "Lists",
+ "html": "\n- \n
a
\n\n- b
\n- c
\n
\n \n- \n
d
\n\n- e
\n- f
\n
\n \n
\n",
+ "markdown": "- a\n - b\n - c\n\n- d\n - e\n - f\n",
+ "example": 287,
+ "start_line": 5341
+ },
+ {
+ "end_line": 5379,
+ "section": "Inlines",
+ "html": "hi
lo`
\n",
+ "markdown": "`hi`lo`\n",
+ "example": 288,
+ "start_line": 5375
+ },
+ {
+ "end_line": 5393,
+ "section": "Backslash escapes",
+ "html": "!"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~
\n",
+ "markdown": "\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\-\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\\\\\]\\^\\_\\`\\{\\|\\}\\~\n",
+ "example": 289,
+ "start_line": 5389
+ },
+ {
+ "end_line": 5403,
+ "section": "Backslash escapes",
+ "html": "\\\t\\A\\a\\ \\3\\φ\\«
\n",
+ "markdown": "\\\t\\A\\a\\ \\3\\φ\\«\n",
+ "example": 290,
+ "start_line": 5399
+ },
+ {
+ "end_line": 5427,
+ "section": "Backslash escapes",
+ "html": "*not emphasized*\n<br/> not a tag\n[not a link](/foo)\n`not code`\n1. not a list\n* not a list\n# not a heading\n[foo]: /url "not a reference"
\n",
+ "markdown": "\\*not emphasized*\n\\
not a tag\n\\[not a link](/foo)\n\\`not code`\n1\\. not a list\n\\* not a list\n\\# not a heading\n\\[foo]: /url \"not a reference\"\n",
+ "example": 291,
+ "start_line": 5409
+ },
+ {
+ "end_line": 5436,
+ "section": "Backslash escapes",
+ "html": "\\emphasis
\n",
+ "markdown": "\\\\*emphasis*\n",
+ "example": 292,
+ "start_line": 5432
+ },
+ {
+ "end_line": 5447,
+ "section": "Backslash escapes",
+ "html": "foo
\nbar
\n",
+ "markdown": "foo\\\nbar\n",
+ "example": 293,
+ "start_line": 5441
+ },
+ {
+ "end_line": 5457,
+ "section": "Backslash escapes",
+ "html": "\\[\\`
\n",
+ "markdown": "`` \\[\\` ``\n",
+ "example": 294,
+ "start_line": 5453
+ },
+ {
+ "end_line": 5465,
+ "section": "Backslash escapes",
+ "html": "\\[\\]\n
\n",
+ "markdown": " \\[\\]\n",
+ "example": 295,
+ "start_line": 5460
+ },
+ {
+ "end_line": 5475,
+ "section": "Backslash escapes",
+ "html": "\\[\\]\n
\n",
+ "markdown": "~~~\n\\[\\]\n~~~\n",
+ "example": 296,
+ "start_line": 5468
+ },
+ {
+ "end_line": 5482,
+ "section": "Backslash escapes",
+ "html": "\n",
+ "markdown": "\n",
+ "example": 297,
+ "start_line": 5478
+ },
+ {
+ "end_line": 5489,
+ "section": "Backslash escapes",
+ "html": "\n",
+ "markdown": "\n",
+ "example": 298,
+ "start_line": 5485
+ },
+ {
+ "end_line": 5499,
+ "section": "Backslash escapes",
+ "html": "\n",
+ "markdown": "[foo](/bar\\* \"ti\\*tle\")\n",
+ "example": 299,
+ "start_line": 5495
+ },
+ {
+ "end_line": 5508,
+ "section": "Backslash escapes",
+ "html": "\n",
+ "markdown": "[foo]\n\n[foo]: /bar\\* \"ti\\*tle\"\n",
+ "example": 300,
+ "start_line": 5502
+ },
+ {
+ "end_line": 5518,
+ "section": "Backslash escapes",
+ "html": "foo\n
\n",
+ "markdown": "``` foo\\+bar\nfoo\n```\n",
+ "example": 301,
+ "start_line": 5511
+ },
+ {
+ "end_line": 5546,
+ "section": "Entity and numeric character references",
+ "html": " & © Æ Ď\n¾ ℋ ⅆ\n∲ ≧̸
\n",
+ "markdown": " & © Æ Ď\n¾ ℋ ⅆ\n∲ ≧̸\n",
+ "example": 302,
+ "start_line": 5538
+ },
+ {
+ "end_line": 5561,
+ "section": "Entity and numeric character references",
+ "html": "# Ӓ Ϡ � �
\n",
+ "markdown": "# Ӓ Ϡ \n",
+ "example": 303,
+ "start_line": 5557
+ },
+ {
+ "end_line": 5574,
+ "section": "Entity and numeric character references",
+ "html": "" ആ ಫ
\n",
+ "markdown": "" ആ ಫ\n",
+ "example": 304,
+ "start_line": 5570
+ },
+ {
+ "end_line": 5585,
+ "section": "Entity and numeric character references",
+ "html": "  &x; &#; &#x;\n&ThisIsNotDefined; &hi?;
\n",
+ "markdown": "  &x; \n&ThisIsNotDefined; &hi?;\n",
+ "example": 305,
+ "start_line": 5579
+ },
+ {
+ "end_line": 5596,
+ "section": "Entity and numeric character references",
+ "html": "©
\n",
+ "markdown": "©\n",
+ "example": 306,
+ "start_line": 5592
+ },
+ {
+ "end_line": 5606,
+ "section": "Entity and numeric character references",
+ "html": "&MadeUpEntity;
\n",
+ "markdown": "&MadeUpEntity;\n",
+ "example": 307,
+ "start_line": 5602
+ },
+ {
+ "end_line": 5617,
+ "section": "Entity and numeric character references",
+ "html": "\n",
+ "markdown": "\n",
+ "example": 308,
+ "start_line": 5613
+ },
+ {
+ "end_line": 5624,
+ "section": "Entity and numeric character references",
+ "html": "\n",
+ "markdown": "[foo](/föö \"föö\")\n",
+ "example": 309,
+ "start_line": 5620
+ },
+ {
+ "end_line": 5633,
+ "section": "Entity and numeric character references",
+ "html": "\n",
+ "markdown": "[foo]\n\n[foo]: /föö \"föö\"\n",
+ "example": 310,
+ "start_line": 5627
+ },
+ {
+ "end_line": 5643,
+ "section": "Entity and numeric character references",
+ "html": "foo\n
\n",
+ "markdown": "``` föö\nfoo\n```\n",
+ "example": 311,
+ "start_line": 5636
+ },
+ {
+ "end_line": 5653,
+ "section": "Entity and numeric character references",
+ "html": "föö
\n",
+ "markdown": "`föö`\n",
+ "example": 312,
+ "start_line": 5649
+ },
+ {
+ "end_line": 5661,
+ "section": "Entity and numeric character references",
+ "html": "föfö\n
\n",
+ "markdown": " föfö\n",
+ "example": 313,
+ "start_line": 5656
+ },
+ {
+ "end_line": 5682,
+ "section": "Code spans",
+ "html": "foo
\n",
+ "markdown": "`foo`\n",
+ "example": 314,
+ "start_line": 5678
+ },
+ {
+ "end_line": 5692,
+ "section": "Code spans",
+ "html": "foo ` bar
\n",
+ "markdown": "`` foo ` bar ``\n",
+ "example": 315,
+ "start_line": 5688
+ },
+ {
+ "end_line": 5702,
+ "section": "Code spans",
+ "html": "``
\n",
+ "markdown": "` `` `\n",
+ "example": 316,
+ "start_line": 5698
+ },
+ {
+ "end_line": 5713,
+ "section": "Code spans",
+ "html": "foo
\n",
+ "markdown": "``\nfoo\n``\n",
+ "example": 317,
+ "start_line": 5707
+ },
+ {
+ "end_line": 5724,
+ "section": "Code spans",
+ "html": "foo bar baz
\n",
+ "markdown": "`foo bar\n baz`\n",
+ "example": 318,
+ "start_line": 5719
+ },
+ {
+ "end_line": 5734,
+ "section": "Code spans",
+ "html": "a b
\n",
+ "markdown": "`a b`\n",
+ "example": 319,
+ "start_line": 5730
+ },
+ {
+ "end_line": 5754,
+ "section": "Code spans",
+ "html": "foo `` bar
\n",
+ "markdown": "`foo `` bar`\n",
+ "example": 320,
+ "start_line": 5750
+ },
+ {
+ "end_line": 5764,
+ "section": "Code spans",
+ "html": "foo\\
bar`
\n",
+ "markdown": "`foo\\`bar`\n",
+ "example": 321,
+ "start_line": 5760
+ },
+ {
+ "end_line": 5780,
+ "section": "Code spans",
+ "html": "*foo*
\n",
+ "markdown": "*foo`*`\n",
+ "example": 322,
+ "start_line": 5776
+ },
+ {
+ "end_line": 5789,
+ "section": "Code spans",
+ "html": "[not a link](/foo
)
\n",
+ "markdown": "[not a `link](/foo`)\n",
+ "example": 323,
+ "start_line": 5785
+ },
+ {
+ "end_line": 5799,
+ "section": "Code spans",
+ "html": "<a href="
">`
\n",
+ "markdown": "``\n",
+ "example": 324,
+ "start_line": 5795
+ },
+ {
+ "end_line": 5808,
+ "section": "Code spans",
+ "html": "\n",
+ "markdown": "`\n",
+ "example": 325,
+ "start_line": 5804
+ },
+ {
+ "end_line": 5817,
+ "section": "Code spans",
+ "html": "<http://foo.bar.
baz>`
\n",
+ "markdown": "``\n",
+ "example": 326,
+ "start_line": 5813
+ },
+ {
+ "end_line": 5826,
+ "section": "Code spans",
+ "html": "\n",
+ "markdown": "`\n",
+ "example": 327,
+ "start_line": 5822
+ },
+ {
+ "end_line": 5836,
+ "section": "Code spans",
+ "html": "```foo``
\n",
+ "markdown": "```foo``\n",
+ "example": 328,
+ "start_line": 5832
+ },
+ {
+ "end_line": 5843,
+ "section": "Code spans",
+ "html": "`foo
\n",
+ "markdown": "`foo\n",
+ "example": 329,
+ "start_line": 5839
+ },
+ {
+ "end_line": 5852,
+ "section": "Code spans",
+ "html": "`foobar
\n",
+ "markdown": "`foo``bar``\n",
+ "example": 330,
+ "start_line": 5848
+ },
+ {
+ "end_line": 6065,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo bar
\n",
+ "markdown": "*foo bar*\n",
+ "example": 331,
+ "start_line": 6061
+ },
+ {
+ "end_line": 6075,
+ "section": "Emphasis and strong emphasis",
+ "html": "a * foo bar*
\n",
+ "markdown": "a * foo bar*\n",
+ "example": 332,
+ "start_line": 6071
+ },
+ {
+ "end_line": 6086,
+ "section": "Emphasis and strong emphasis",
+ "html": "a*"foo"*
\n",
+ "markdown": "a*\"foo\"*\n",
+ "example": 333,
+ "start_line": 6082
+ },
+ {
+ "end_line": 6095,
+ "section": "Emphasis and strong emphasis",
+ "html": "* a *
\n",
+ "markdown": "* a *\n",
+ "example": 334,
+ "start_line": 6091
+ },
+ {
+ "end_line": 6104,
+ "section": "Emphasis and strong emphasis",
+ "html": "foobar
\n",
+ "markdown": "foo*bar*\n",
+ "example": 335,
+ "start_line": 6100
+ },
+ {
+ "end_line": 6111,
+ "section": "Emphasis and strong emphasis",
+ "html": "5678
\n",
+ "markdown": "5*6*78\n",
+ "example": 336,
+ "start_line": 6107
+ },
+ {
+ "end_line": 6120,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo bar
\n",
+ "markdown": "_foo bar_\n",
+ "example": 337,
+ "start_line": 6116
+ },
+ {
+ "end_line": 6130,
+ "section": "Emphasis and strong emphasis",
+ "html": "_ foo bar_
\n",
+ "markdown": "_ foo bar_\n",
+ "example": 338,
+ "start_line": 6126
+ },
+ {
+ "end_line": 6140,
+ "section": "Emphasis and strong emphasis",
+ "html": "a_"foo"_
\n",
+ "markdown": "a_\"foo\"_\n",
+ "example": 339,
+ "start_line": 6136
+ },
+ {
+ "end_line": 6149,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo_bar_
\n",
+ "markdown": "foo_bar_\n",
+ "example": 340,
+ "start_line": 6145
+ },
+ {
+ "end_line": 6156,
+ "section": "Emphasis and strong emphasis",
+ "html": "5_6_78
\n",
+ "markdown": "5_6_78\n",
+ "example": 341,
+ "start_line": 6152
+ },
+ {
+ "end_line": 6163,
+ "section": "Emphasis and strong emphasis",
+ "html": "пристаням_стремятся_
\n",
+ "markdown": "пристаням_стремятся_\n",
+ "example": 342,
+ "start_line": 6159
+ },
+ {
+ "end_line": 6173,
+ "section": "Emphasis and strong emphasis",
+ "html": "aa_"bb"_cc
\n",
+ "markdown": "aa_\"bb\"_cc\n",
+ "example": 343,
+ "start_line": 6169
+ },
+ {
+ "end_line": 6184,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo-(bar)
\n",
+ "markdown": "foo-_(bar)_\n",
+ "example": 344,
+ "start_line": 6180
+ },
+ {
+ "end_line": 6196,
+ "section": "Emphasis and strong emphasis",
+ "html": "_foo*
\n",
+ "markdown": "_foo*\n",
+ "example": 345,
+ "start_line": 6192
+ },
+ {
+ "end_line": 6206,
+ "section": "Emphasis and strong emphasis",
+ "html": "*foo bar *
\n",
+ "markdown": "*foo bar *\n",
+ "example": 346,
+ "start_line": 6202
+ },
+ {
+ "end_line": 6217,
+ "section": "Emphasis and strong emphasis",
+ "html": "*foo bar\n*
\n",
+ "markdown": "*foo bar\n*\n",
+ "example": 347,
+ "start_line": 6211
+ },
+ {
+ "end_line": 6228,
+ "section": "Emphasis and strong emphasis",
+ "html": "*(*foo)
\n",
+ "markdown": "*(*foo)\n",
+ "example": 348,
+ "start_line": 6224
+ },
+ {
+ "end_line": 6238,
+ "section": "Emphasis and strong emphasis",
+ "html": "(foo)
\n",
+ "markdown": "*(*foo*)*\n",
+ "example": 349,
+ "start_line": 6234
+ },
+ {
+ "end_line": 6247,
+ "section": "Emphasis and strong emphasis",
+ "html": "foobar
\n",
+ "markdown": "*foo*bar\n",
+ "example": 350,
+ "start_line": 6243
+ },
+ {
+ "end_line": 6260,
+ "section": "Emphasis and strong emphasis",
+ "html": "_foo bar _
\n",
+ "markdown": "_foo bar _\n",
+ "example": 351,
+ "start_line": 6256
+ },
+ {
+ "end_line": 6270,
+ "section": "Emphasis and strong emphasis",
+ "html": "_(_foo)
\n",
+ "markdown": "_(_foo)\n",
+ "example": 352,
+ "start_line": 6266
+ },
+ {
+ "end_line": 6279,
+ "section": "Emphasis and strong emphasis",
+ "html": "(foo)
\n",
+ "markdown": "_(_foo_)_\n",
+ "example": 353,
+ "start_line": 6275
+ },
+ {
+ "end_line": 6288,
+ "section": "Emphasis and strong emphasis",
+ "html": "_foo_bar
\n",
+ "markdown": "_foo_bar\n",
+ "example": 354,
+ "start_line": 6284
+ },
+ {
+ "end_line": 6295,
+ "section": "Emphasis and strong emphasis",
+ "html": "_пристаням_стремятся
\n",
+ "markdown": "_пристаням_стремятся\n",
+ "example": 355,
+ "start_line": 6291
+ },
+ {
+ "end_line": 6302,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo_bar_baz
\n",
+ "markdown": "_foo_bar_baz_\n",
+ "example": 356,
+ "start_line": 6298
+ },
+ {
+ "end_line": 6313,
+ "section": "Emphasis and strong emphasis",
+ "html": "(bar).
\n",
+ "markdown": "_(bar)_.\n",
+ "example": 357,
+ "start_line": 6309
+ },
+ {
+ "end_line": 6322,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo bar
\n",
+ "markdown": "**foo bar**\n",
+ "example": 358,
+ "start_line": 6318
+ },
+ {
+ "end_line": 6332,
+ "section": "Emphasis and strong emphasis",
+ "html": "** foo bar**
\n",
+ "markdown": "** foo bar**\n",
+ "example": 359,
+ "start_line": 6328
+ },
+ {
+ "end_line": 6343,
+ "section": "Emphasis and strong emphasis",
+ "html": "a**"foo"**
\n",
+ "markdown": "a**\"foo\"**\n",
+ "example": 360,
+ "start_line": 6339
+ },
+ {
+ "end_line": 6352,
+ "section": "Emphasis and strong emphasis",
+ "html": "foobar
\n",
+ "markdown": "foo**bar**\n",
+ "example": 361,
+ "start_line": 6348
+ },
+ {
+ "end_line": 6361,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo bar
\n",
+ "markdown": "__foo bar__\n",
+ "example": 362,
+ "start_line": 6357
+ },
+ {
+ "end_line": 6371,
+ "section": "Emphasis and strong emphasis",
+ "html": "__ foo bar__
\n",
+ "markdown": "__ foo bar__\n",
+ "example": 363,
+ "start_line": 6367
+ },
+ {
+ "end_line": 6381,
+ "section": "Emphasis and strong emphasis",
+ "html": "__\nfoo bar__
\n",
+ "markdown": "__\nfoo bar__\n",
+ "example": 364,
+ "start_line": 6375
+ },
+ {
+ "end_line": 6391,
+ "section": "Emphasis and strong emphasis",
+ "html": "a__"foo"__
\n",
+ "markdown": "a__\"foo\"__\n",
+ "example": 365,
+ "start_line": 6387
+ },
+ {
+ "end_line": 6400,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo__bar__
\n",
+ "markdown": "foo__bar__\n",
+ "example": 366,
+ "start_line": 6396
+ },
+ {
+ "end_line": 6407,
+ "section": "Emphasis and strong emphasis",
+ "html": "5__6__78
\n",
+ "markdown": "5__6__78\n",
+ "example": 367,
+ "start_line": 6403
+ },
+ {
+ "end_line": 6414,
+ "section": "Emphasis and strong emphasis",
+ "html": "пристаням__стремятся__
\n",
+ "markdown": "пристаням__стремятся__\n",
+ "example": 368,
+ "start_line": 6410
+ },
+ {
+ "end_line": 6421,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo, bar, baz
\n",
+ "markdown": "__foo, __bar__, baz__\n",
+ "example": 369,
+ "start_line": 6417
+ },
+ {
+ "end_line": 6432,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo-(bar)
\n",
+ "markdown": "foo-__(bar)__\n",
+ "example": 370,
+ "start_line": 6428
+ },
+ {
+ "end_line": 6445,
+ "section": "Emphasis and strong emphasis",
+ "html": "**foo bar **
\n",
+ "markdown": "**foo bar **\n",
+ "example": 371,
+ "start_line": 6441
+ },
+ {
+ "end_line": 6458,
+ "section": "Emphasis and strong emphasis",
+ "html": "**(**foo)
\n",
+ "markdown": "**(**foo)\n",
+ "example": 372,
+ "start_line": 6454
+ },
+ {
+ "end_line": 6468,
+ "section": "Emphasis and strong emphasis",
+ "html": "(foo)
\n",
+ "markdown": "*(**foo**)*\n",
+ "example": 373,
+ "start_line": 6464
+ },
+ {
+ "end_line": 6477,
+ "section": "Emphasis and strong emphasis",
+ "html": "Gomphocarpus (Gomphocarpus physocarpus, syn.\nAsclepias physocarpa)
\n",
+ "markdown": "**Gomphocarpus (*Gomphocarpus physocarpus*, syn.\n*Asclepias physocarpa*)**\n",
+ "example": 374,
+ "start_line": 6471
+ },
+ {
+ "end_line": 6484,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo "bar" foo
\n",
+ "markdown": "**foo \"*bar*\" foo**\n",
+ "example": 375,
+ "start_line": 6480
+ },
+ {
+ "end_line": 6493,
+ "section": "Emphasis and strong emphasis",
+ "html": "foobar
\n",
+ "markdown": "**foo**bar\n",
+ "example": 376,
+ "start_line": 6489
+ },
+ {
+ "end_line": 6505,
+ "section": "Emphasis and strong emphasis",
+ "html": "__foo bar __
\n",
+ "markdown": "__foo bar __\n",
+ "example": 377,
+ "start_line": 6501
+ },
+ {
+ "end_line": 6515,
+ "section": "Emphasis and strong emphasis",
+ "html": "__(__foo)
\n",
+ "markdown": "__(__foo)\n",
+ "example": 378,
+ "start_line": 6511
+ },
+ {
+ "end_line": 6525,
+ "section": "Emphasis and strong emphasis",
+ "html": "(foo)
\n",
+ "markdown": "_(__foo__)_\n",
+ "example": 379,
+ "start_line": 6521
+ },
+ {
+ "end_line": 6534,
+ "section": "Emphasis and strong emphasis",
+ "html": "__foo__bar
\n",
+ "markdown": "__foo__bar\n",
+ "example": 380,
+ "start_line": 6530
+ },
+ {
+ "end_line": 6541,
+ "section": "Emphasis and strong emphasis",
+ "html": "__пристаням__стремятся
\n",
+ "markdown": "__пристаням__стремятся\n",
+ "example": 381,
+ "start_line": 6537
+ },
+ {
+ "end_line": 6548,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo__bar__baz
\n",
+ "markdown": "__foo__bar__baz__\n",
+ "example": 382,
+ "start_line": 6544
+ },
+ {
+ "end_line": 6559,
+ "section": "Emphasis and strong emphasis",
+ "html": "(bar).
\n",
+ "markdown": "__(bar)__.\n",
+ "example": 383,
+ "start_line": 6555
+ },
+ {
+ "end_line": 6571,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo bar
\n",
+ "markdown": "*foo [bar](/url)*\n",
+ "example": 384,
+ "start_line": 6567
+ },
+ {
+ "end_line": 6580,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo\nbar
\n",
+ "markdown": "*foo\nbar*\n",
+ "example": 385,
+ "start_line": 6574
+ },
+ {
+ "end_line": 6590,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo bar baz
\n",
+ "markdown": "_foo __bar__ baz_\n",
+ "example": 386,
+ "start_line": 6586
+ },
+ {
+ "end_line": 6597,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo bar baz
\n",
+ "markdown": "_foo _bar_ baz_\n",
+ "example": 387,
+ "start_line": 6593
+ },
+ {
+ "end_line": 6604,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo bar
\n",
+ "markdown": "__foo_ bar_\n",
+ "example": 388,
+ "start_line": 6600
+ },
+ {
+ "end_line": 6611,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo bar
\n",
+ "markdown": "*foo *bar**\n",
+ "example": 389,
+ "start_line": 6607
+ },
+ {
+ "end_line": 6618,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo bar baz
\n",
+ "markdown": "*foo **bar** baz*\n",
+ "example": 390,
+ "start_line": 6614
+ },
+ {
+ "end_line": 6624,
+ "section": "Emphasis and strong emphasis",
+ "html": "foobarbaz
\n",
+ "markdown": "*foo**bar**baz*\n",
+ "example": 391,
+ "start_line": 6620
+ },
+ {
+ "end_line": 6649,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo bar
\n",
+ "markdown": "***foo** bar*\n",
+ "example": 392,
+ "start_line": 6645
+ },
+ {
+ "end_line": 6656,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo bar
\n",
+ "markdown": "*foo **bar***\n",
+ "example": 393,
+ "start_line": 6652
+ },
+ {
+ "end_line": 6663,
+ "section": "Emphasis and strong emphasis",
+ "html": "foobar
\n",
+ "markdown": "*foo**bar***\n",
+ "example": 394,
+ "start_line": 6659
+ },
+ {
+ "end_line": 6672,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo bar baz bim bop
\n",
+ "markdown": "*foo **bar *baz* bim** bop*\n",
+ "example": 395,
+ "start_line": 6668
+ },
+ {
+ "end_line": 6679,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo bar
\n",
+ "markdown": "*foo [*bar*](/url)*\n",
+ "example": 396,
+ "start_line": 6675
+ },
+ {
+ "end_line": 6688,
+ "section": "Emphasis and strong emphasis",
+ "html": "** is not an empty emphasis
\n",
+ "markdown": "** is not an empty emphasis\n",
+ "example": 397,
+ "start_line": 6684
+ },
+ {
+ "end_line": 6695,
+ "section": "Emphasis and strong emphasis",
+ "html": "**** is not an empty strong emphasis
\n",
+ "markdown": "**** is not an empty strong emphasis\n",
+ "example": 398,
+ "start_line": 6691
+ },
+ {
+ "end_line": 6708,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo bar
\n",
+ "markdown": "**foo [bar](/url)**\n",
+ "example": 399,
+ "start_line": 6704
+ },
+ {
+ "end_line": 6717,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo\nbar
\n",
+ "markdown": "**foo\nbar**\n",
+ "example": 400,
+ "start_line": 6711
+ },
+ {
+ "end_line": 6727,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo bar baz
\n",
+ "markdown": "__foo _bar_ baz__\n",
+ "example": 401,
+ "start_line": 6723
+ },
+ {
+ "end_line": 6734,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo bar baz
\n",
+ "markdown": "__foo __bar__ baz__\n",
+ "example": 402,
+ "start_line": 6730
+ },
+ {
+ "end_line": 6741,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo bar
\n",
+ "markdown": "____foo__ bar__\n",
+ "example": 403,
+ "start_line": 6737
+ },
+ {
+ "end_line": 6748,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo bar
\n",
+ "markdown": "**foo **bar****\n",
+ "example": 404,
+ "start_line": 6744
+ },
+ {
+ "end_line": 6755,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo bar baz
\n",
+ "markdown": "**foo *bar* baz**\n",
+ "example": 405,
+ "start_line": 6751
+ },
+ {
+ "end_line": 6762,
+ "section": "Emphasis and strong emphasis",
+ "html": "foobarbaz
\n",
+ "markdown": "**foo*bar*baz**\n",
+ "example": 406,
+ "start_line": 6758
+ },
+ {
+ "end_line": 6769,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo bar
\n",
+ "markdown": "***foo* bar**\n",
+ "example": 407,
+ "start_line": 6765
+ },
+ {
+ "end_line": 6776,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo bar
\n",
+ "markdown": "**foo *bar***\n",
+ "example": 408,
+ "start_line": 6772
+ },
+ {
+ "end_line": 6787,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo bar baz\nbim bop
\n",
+ "markdown": "**foo *bar **baz**\nbim* bop**\n",
+ "example": 409,
+ "start_line": 6781
+ },
+ {
+ "end_line": 6794,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo bar
\n",
+ "markdown": "**foo [*bar*](/url)**\n",
+ "example": 410,
+ "start_line": 6790
+ },
+ {
+ "end_line": 6803,
+ "section": "Emphasis and strong emphasis",
+ "html": "__ is not an empty emphasis
\n",
+ "markdown": "__ is not an empty emphasis\n",
+ "example": 411,
+ "start_line": 6799
+ },
+ {
+ "end_line": 6810,
+ "section": "Emphasis and strong emphasis",
+ "html": "____ is not an empty strong emphasis
\n",
+ "markdown": "____ is not an empty strong emphasis\n",
+ "example": 412,
+ "start_line": 6806
+ },
+ {
+ "end_line": 6820,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo ***
\n",
+ "markdown": "foo ***\n",
+ "example": 413,
+ "start_line": 6816
+ },
+ {
+ "end_line": 6827,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo *
\n",
+ "markdown": "foo *\\**\n",
+ "example": 414,
+ "start_line": 6823
+ },
+ {
+ "end_line": 6834,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo _
\n",
+ "markdown": "foo *_*\n",
+ "example": 415,
+ "start_line": 6830
+ },
+ {
+ "end_line": 6841,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo *****
\n",
+ "markdown": "foo *****\n",
+ "example": 416,
+ "start_line": 6837
+ },
+ {
+ "end_line": 6848,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo *
\n",
+ "markdown": "foo **\\***\n",
+ "example": 417,
+ "start_line": 6844
+ },
+ {
+ "end_line": 6855,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo _
\n",
+ "markdown": "foo **_**\n",
+ "example": 418,
+ "start_line": 6851
+ },
+ {
+ "end_line": 6866,
+ "section": "Emphasis and strong emphasis",
+ "html": "*foo
\n",
+ "markdown": "**foo*\n",
+ "example": 419,
+ "start_line": 6862
+ },
+ {
+ "end_line": 6873,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo*
\n",
+ "markdown": "*foo**\n",
+ "example": 420,
+ "start_line": 6869
+ },
+ {
+ "end_line": 6880,
+ "section": "Emphasis and strong emphasis",
+ "html": "*foo
\n",
+ "markdown": "***foo**\n",
+ "example": 421,
+ "start_line": 6876
+ },
+ {
+ "end_line": 6887,
+ "section": "Emphasis and strong emphasis",
+ "html": "***foo
\n",
+ "markdown": "****foo*\n",
+ "example": 422,
+ "start_line": 6883
+ },
+ {
+ "end_line": 6894,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo*
\n",
+ "markdown": "**foo***\n",
+ "example": 423,
+ "start_line": 6890
+ },
+ {
+ "end_line": 6901,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo***
\n",
+ "markdown": "*foo****\n",
+ "example": 424,
+ "start_line": 6897
+ },
+ {
+ "end_line": 6911,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo ___
\n",
+ "markdown": "foo ___\n",
+ "example": 425,
+ "start_line": 6907
+ },
+ {
+ "end_line": 6918,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo _
\n",
+ "markdown": "foo _\\__\n",
+ "example": 426,
+ "start_line": 6914
+ },
+ {
+ "end_line": 6925,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo *
\n",
+ "markdown": "foo _*_\n",
+ "example": 427,
+ "start_line": 6921
+ },
+ {
+ "end_line": 6932,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo _____
\n",
+ "markdown": "foo _____\n",
+ "example": 428,
+ "start_line": 6928
+ },
+ {
+ "end_line": 6939,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo _
\n",
+ "markdown": "foo __\\___\n",
+ "example": 429,
+ "start_line": 6935
+ },
+ {
+ "end_line": 6946,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo *
\n",
+ "markdown": "foo __*__\n",
+ "example": 430,
+ "start_line": 6942
+ },
+ {
+ "end_line": 6953,
+ "section": "Emphasis and strong emphasis",
+ "html": "_foo
\n",
+ "markdown": "__foo_\n",
+ "example": 431,
+ "start_line": 6949
+ },
+ {
+ "end_line": 6964,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo_
\n",
+ "markdown": "_foo__\n",
+ "example": 432,
+ "start_line": 6960
+ },
+ {
+ "end_line": 6971,
+ "section": "Emphasis and strong emphasis",
+ "html": "_foo
\n",
+ "markdown": "___foo__\n",
+ "example": 433,
+ "start_line": 6967
+ },
+ {
+ "end_line": 6978,
+ "section": "Emphasis and strong emphasis",
+ "html": "___foo
\n",
+ "markdown": "____foo_\n",
+ "example": 434,
+ "start_line": 6974
+ },
+ {
+ "end_line": 6985,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo_
\n",
+ "markdown": "__foo___\n",
+ "example": 435,
+ "start_line": 6981
+ },
+ {
+ "end_line": 6992,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo___
\n",
+ "markdown": "_foo____\n",
+ "example": 436,
+ "start_line": 6988
+ },
+ {
+ "end_line": 7002,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo
\n",
+ "markdown": "**foo**\n",
+ "example": 437,
+ "start_line": 6998
+ },
+ {
+ "end_line": 7009,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo
\n",
+ "markdown": "*_foo_*\n",
+ "example": 438,
+ "start_line": 7005
+ },
+ {
+ "end_line": 7016,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo
\n",
+ "markdown": "__foo__\n",
+ "example": 439,
+ "start_line": 7012
+ },
+ {
+ "end_line": 7023,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo
\n",
+ "markdown": "_*foo*_\n",
+ "example": 440,
+ "start_line": 7019
+ },
+ {
+ "end_line": 7033,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo
\n",
+ "markdown": "****foo****\n",
+ "example": 441,
+ "start_line": 7029
+ },
+ {
+ "end_line": 7040,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo
\n",
+ "markdown": "____foo____\n",
+ "example": 442,
+ "start_line": 7036
+ },
+ {
+ "end_line": 7051,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo
\n",
+ "markdown": "******foo******\n",
+ "example": 443,
+ "start_line": 7047
+ },
+ {
+ "end_line": 7060,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo
\n",
+ "markdown": "***foo***\n",
+ "example": 444,
+ "start_line": 7056
+ },
+ {
+ "end_line": 7067,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo
\n",
+ "markdown": "_____foo_____\n",
+ "example": 445,
+ "start_line": 7063
+ },
+ {
+ "end_line": 7076,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo _bar baz_
\n",
+ "markdown": "*foo _bar* baz_\n",
+ "example": 446,
+ "start_line": 7072
+ },
+ {
+ "end_line": 7083,
+ "section": "Emphasis and strong emphasis",
+ "html": "foo bar *baz bim bam
\n",
+ "markdown": "*foo __bar *baz bim__ bam*\n",
+ "example": 447,
+ "start_line": 7079
+ },
+ {
+ "end_line": 7092,
+ "section": "Emphasis and strong emphasis",
+ "html": "**foo bar baz
\n",
+ "markdown": "**foo **bar baz**\n",
+ "example": 448,
+ "start_line": 7088
+ },
+ {
+ "end_line": 7099,
+ "section": "Emphasis and strong emphasis",
+ "html": "*foo bar baz
\n",
+ "markdown": "*foo *bar baz*\n",
+ "example": 449,
+ "start_line": 7095
+ },
+ {
+ "end_line": 7108,
+ "section": "Emphasis and strong emphasis",
+ "html": "*bar*
\n",
+ "markdown": "*[bar*](/url)\n",
+ "example": 450,
+ "start_line": 7104
+ },
+ {
+ "end_line": 7115,
+ "section": "Emphasis and strong emphasis",
+ "html": "_foo bar_
\n",
+ "markdown": "_foo [bar_](/url)\n",
+ "example": 451,
+ "start_line": 7111
+ },
+ {
+ "end_line": 7122,
+ "section": "Emphasis and strong emphasis",
+ "html": "*
\n",
+ "markdown": "*\n",
+ "example": 452,
+ "start_line": 7118
+ },
+ {
+ "end_line": 7129,
+ "section": "Emphasis and strong emphasis",
+ "html": "\n",
+ "markdown": "**\n",
+ "example": 453,
+ "start_line": 7125
+ },
+ {
+ "end_line": 7136,
+ "section": "Emphasis and strong emphasis",
+ "html": "\n",
+ "markdown": "__\n",
+ "example": 454,
+ "start_line": 7132
+ },
+ {
+ "end_line": 7143,
+ "section": "Emphasis and strong emphasis",
+ "html": "a *
\n",
+ "markdown": "*a `*`*\n",
+ "example": 455,
+ "start_line": 7139
+ },
+ {
+ "end_line": 7150,
+ "section": "Emphasis and strong emphasis",
+ "html": "a _
\n",
+ "markdown": "_a `_`_\n",
+ "example": 456,
+ "start_line": 7146
+ },
+ {
+ "end_line": 7157,
+ "section": "Emphasis and strong emphasis",
+ "html": "\n",
+ "markdown": "**a\n",
+ "example": 457,
+ "start_line": 7153
+ },
+ {
+ "end_line": 7164,
+ "section": "Emphasis and strong emphasis",
+ "html": "\n",
+ "markdown": "__a\n",
+ "example": 458,
+ "start_line": 7160
+ },
+ {
+ "end_line": 7245,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[link](/uri \"title\")\n",
+ "example": 459,
+ "start_line": 7241
+ },
+ {
+ "end_line": 7254,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[link](/uri)\n",
+ "example": 460,
+ "start_line": 7250
+ },
+ {
+ "end_line": 7263,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[link]()\n",
+ "example": 461,
+ "start_line": 7259
+ },
+ {
+ "end_line": 7270,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[link](<>)\n",
+ "example": 462,
+ "start_line": 7266
+ },
+ {
+ "end_line": 7280,
+ "section": "Links",
+ "html": "[link](/my uri)
\n",
+ "markdown": "[link](/my uri)\n",
+ "example": 463,
+ "start_line": 7276
+ },
+ {
+ "end_line": 7287,
+ "section": "Links",
+ "html": "[link](</my uri>)
\n",
+ "markdown": "[link]( )\n",
+ "example": 464,
+ "start_line": 7283
+ },
+ {
+ "end_line": 7296,
+ "section": "Links",
+ "html": "[link](foo\nbar)
\n",
+ "markdown": "[link](foo\nbar)\n",
+ "example": 465,
+ "start_line": 7290
+ },
+ {
+ "end_line": 7305,
+ "section": "Links",
+ "html": "[link]()
\n",
+ "markdown": "[link]()\n",
+ "example": 466,
+ "start_line": 7299
+ },
+ {
+ "end_line": 7313,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[link](\\(foo\\))\n",
+ "example": 467,
+ "start_line": 7309
+ },
+ {
+ "end_line": 7322,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[link](foo(and(bar)))\n",
+ "example": 468,
+ "start_line": 7318
+ },
+ {
+ "end_line": 7331,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[link](foo\\(and\\(bar\\))\n",
+ "example": 469,
+ "start_line": 7327
+ },
+ {
+ "end_line": 7338,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[link]()\n",
+ "example": 470,
+ "start_line": 7334
+ },
+ {
+ "end_line": 7348,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[link](foo\\)\\:)\n",
+ "example": 471,
+ "start_line": 7344
+ },
+ {
+ "end_line": 7363,
+ "section": "Links",
+ "html": "\n\n\n",
+ "markdown": "[link](#fragment)\n\n[link](http://example.com#fragment)\n\n[link](http://example.com?foo=3#frag)\n",
+ "example": 472,
+ "start_line": 7353
+ },
+ {
+ "end_line": 7373,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[link](foo\\bar)\n",
+ "example": 473,
+ "start_line": 7369
+ },
+ {
+ "end_line": 7389,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[link](foo%20bä)\n",
+ "example": 474,
+ "start_line": 7385
+ },
+ {
+ "end_line": 7400,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[link](\"title\")\n",
+ "example": 475,
+ "start_line": 7396
+ },
+ {
+ "end_line": 7413,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[link](/url \"title\")\n[link](/url 'title')\n[link](/url (title))\n",
+ "example": 476,
+ "start_line": 7405
+ },
+ {
+ "end_line": 7423,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[link](/url \"title \\\""\")\n",
+ "example": 477,
+ "start_line": 7419
+ },
+ {
+ "end_line": 7433,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[link](/url \"title\")\n",
+ "example": 478,
+ "start_line": 7429
+ },
+ {
+ "end_line": 7442,
+ "section": "Links",
+ "html": "[link](/url "title "and" title")
\n",
+ "markdown": "[link](/url \"title \"and\" title\")\n",
+ "example": 479,
+ "start_line": 7438
+ },
+ {
+ "end_line": 7451,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[link](/url 'title \"and\" title')\n",
+ "example": 480,
+ "start_line": 7447
+ },
+ {
+ "end_line": 7476,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[link]( /uri\n \"title\" )\n",
+ "example": 481,
+ "start_line": 7471
+ },
+ {
+ "end_line": 7486,
+ "section": "Links",
+ "html": "[link] (/uri)
\n",
+ "markdown": "[link] (/uri)\n",
+ "example": 482,
+ "start_line": 7482
+ },
+ {
+ "end_line": 7496,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[link [foo [bar]]](/uri)\n",
+ "example": 483,
+ "start_line": 7492
+ },
+ {
+ "end_line": 7503,
+ "section": "Links",
+ "html": "[link] bar](/uri)
\n",
+ "markdown": "[link] bar](/uri)\n",
+ "example": 484,
+ "start_line": 7499
+ },
+ {
+ "end_line": 7510,
+ "section": "Links",
+ "html": "[link bar
\n",
+ "markdown": "[link [bar](/uri)\n",
+ "example": 485,
+ "start_line": 7506
+ },
+ {
+ "end_line": 7517,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[link \\[bar](/uri)\n",
+ "example": 486,
+ "start_line": 7513
+ },
+ {
+ "end_line": 7526,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[link *foo **bar** `#`*](/uri)\n",
+ "example": 487,
+ "start_line": 7522
+ },
+ {
+ "end_line": 7533,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[![moon](moon.jpg)](/uri)\n",
+ "example": 488,
+ "start_line": 7529
+ },
+ {
+ "end_line": 7542,
+ "section": "Links",
+ "html": "[foo bar](/uri)
\n",
+ "markdown": "[foo [bar](/uri)](/uri)\n",
+ "example": 489,
+ "start_line": 7538
+ },
+ {
+ "end_line": 7549,
+ "section": "Links",
+ "html": "[foo [bar baz](/uri)](/uri)
\n",
+ "markdown": "[foo *[bar [baz](/uri)](/uri)*](/uri)\n",
+ "example": 490,
+ "start_line": 7545
+ },
+ {
+ "end_line": 7556,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "![[[foo](uri1)](uri2)](uri3)\n",
+ "example": 491,
+ "start_line": 7552
+ },
+ {
+ "end_line": 7566,
+ "section": "Links",
+ "html": "*foo*
\n",
+ "markdown": "*[foo*](/uri)\n",
+ "example": 492,
+ "start_line": 7562
+ },
+ {
+ "end_line": 7573,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[foo *bar](baz*)\n",
+ "example": 493,
+ "start_line": 7569
+ },
+ {
+ "end_line": 7583,
+ "section": "Links",
+ "html": "foo [bar baz]
\n",
+ "markdown": "*foo [bar* baz]\n",
+ "example": 494,
+ "start_line": 7579
+ },
+ {
+ "end_line": 7593,
+ "section": "Links",
+ "html": "[foo
\n",
+ "markdown": "[foo \n",
+ "example": 495,
+ "start_line": 7589
+ },
+ {
+ "end_line": 7600,
+ "section": "Links",
+ "html": "[foo](/uri)
\n",
+ "markdown": "[foo`](/uri)`\n",
+ "example": 496,
+ "start_line": 7596
+ },
+ {
+ "end_line": 7607,
+ "section": "Links",
+ "html": "[foohttp://example.com/?search=](uri)
\n",
+ "markdown": "[foo\n",
+ "example": 497,
+ "start_line": 7603
+ },
+ {
+ "end_line": 7647,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[foo][bar]\n\n[bar]: /url \"title\"\n",
+ "example": 498,
+ "start_line": 7641
+ },
+ {
+ "end_line": 7662,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[link [foo [bar]]][ref]\n\n[ref]: /uri\n",
+ "example": 499,
+ "start_line": 7656
+ },
+ {
+ "end_line": 7671,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[link \\[bar][ref]\n\n[ref]: /uri\n",
+ "example": 500,
+ "start_line": 7665
+ },
+ {
+ "end_line": 7682,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[link *foo **bar** `#`*][ref]\n\n[ref]: /uri\n",
+ "example": 501,
+ "start_line": 7676
+ },
+ {
+ "end_line": 7691,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[![moon](moon.jpg)][ref]\n\n[ref]: /uri\n",
+ "example": 502,
+ "start_line": 7685
+ },
+ {
+ "end_line": 7702,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[foo [bar](/uri)][ref]\n\n[ref]: /uri\n",
+ "example": 503,
+ "start_line": 7696
+ },
+ {
+ "end_line": 7711,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[foo *bar [baz][ref]*][ref]\n\n[ref]: /uri\n",
+ "example": 504,
+ "start_line": 7705
+ },
+ {
+ "end_line": 7726,
+ "section": "Links",
+ "html": "*foo*
\n",
+ "markdown": "*[foo*][ref]\n\n[ref]: /uri\n",
+ "example": 505,
+ "start_line": 7720
+ },
+ {
+ "end_line": 7735,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[foo *bar][ref]\n\n[ref]: /uri\n",
+ "example": 506,
+ "start_line": 7729
+ },
+ {
+ "end_line": 7747,
+ "section": "Links",
+ "html": "[foo
\n",
+ "markdown": "[foo \n\n[ref]: /uri\n",
+ "example": 507,
+ "start_line": 7741
+ },
+ {
+ "end_line": 7756,
+ "section": "Links",
+ "html": "[foo][ref]
\n",
+ "markdown": "[foo`][ref]`\n\n[ref]: /uri\n",
+ "example": 508,
+ "start_line": 7750
+ },
+ {
+ "end_line": 7765,
+ "section": "Links",
+ "html": "[foohttp://example.com/?search=][ref]
\n",
+ "markdown": "[foo\n\n[ref]: /uri\n",
+ "example": 509,
+ "start_line": 7759
+ },
+ {
+ "end_line": 7776,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[foo][BaR]\n\n[bar]: /url \"title\"\n",
+ "example": 510,
+ "start_line": 7770
+ },
+ {
+ "end_line": 7787,
+ "section": "Links",
+ "html": "Толпой is a Russian word.
\n",
+ "markdown": "[Толпой][Толпой] is a Russian word.\n\n[ТОЛПОЙ]: /url\n",
+ "example": 511,
+ "start_line": 7781
+ },
+ {
+ "end_line": 7800,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[Foo\n bar]: /url\n\n[Baz][Foo bar]\n",
+ "example": 512,
+ "start_line": 7793
+ },
+ {
+ "end_line": 7812,
+ "section": "Links",
+ "html": "[foo] bar
\n",
+ "markdown": "[foo] [bar]\n\n[bar]: /url \"title\"\n",
+ "example": 513,
+ "start_line": 7806
+ },
+ {
+ "end_line": 7823,
+ "section": "Links",
+ "html": "[foo]\nbar
\n",
+ "markdown": "[foo]\n[bar]\n\n[bar]: /url \"title\"\n",
+ "example": 514,
+ "start_line": 7815
+ },
+ {
+ "end_line": 7864,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[foo]: /url1\n\n[foo]: /url2\n\n[bar][foo]\n",
+ "example": 515,
+ "start_line": 7856
+ },
+ {
+ "end_line": 7877,
+ "section": "Links",
+ "html": "[bar][foo!]
\n",
+ "markdown": "[bar][foo\\!]\n\n[foo!]: /url\n",
+ "example": 516,
+ "start_line": 7871
+ },
+ {
+ "end_line": 7890,
+ "section": "Links",
+ "html": "[foo][ref[]
\n[ref[]: /uri
\n",
+ "markdown": "[foo][ref[]\n\n[ref[]: /uri\n",
+ "example": 517,
+ "start_line": 7883
+ },
+ {
+ "end_line": 7900,
+ "section": "Links",
+ "html": "[foo][ref[bar]]
\n[ref[bar]]: /uri
\n",
+ "markdown": "[foo][ref[bar]]\n\n[ref[bar]]: /uri\n",
+ "example": 518,
+ "start_line": 7893
+ },
+ {
+ "end_line": 7910,
+ "section": "Links",
+ "html": "[[[foo]]]
\n[[[foo]]]: /url
\n",
+ "markdown": "[[[foo]]]\n\n[[[foo]]]: /url\n",
+ "example": 519,
+ "start_line": 7903
+ },
+ {
+ "end_line": 7919,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[foo][ref\\[]\n\n[ref\\[]: /uri\n",
+ "example": 520,
+ "start_line": 7913
+ },
+ {
+ "end_line": 7930,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[bar\\\\]: /uri\n\n[bar\\\\]\n",
+ "example": 521,
+ "start_line": 7924
+ },
+ {
+ "end_line": 7942,
+ "section": "Links",
+ "html": "[]
\n[]: /uri
\n",
+ "markdown": "[]\n\n[]: /uri\n",
+ "example": 522,
+ "start_line": 7935
+ },
+ {
+ "end_line": 7956,
+ "section": "Links",
+ "html": "[\n]
\n[\n]: /uri
\n",
+ "markdown": "[\n ]\n\n[\n ]: /uri\n",
+ "example": 523,
+ "start_line": 7945
+ },
+ {
+ "end_line": 7974,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[foo][]\n\n[foo]: /url \"title\"\n",
+ "example": 524,
+ "start_line": 7968
+ },
+ {
+ "end_line": 7983,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[*foo* bar][]\n\n[*foo* bar]: /url \"title\"\n",
+ "example": 525,
+ "start_line": 7977
+ },
+ {
+ "end_line": 7994,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[Foo][]\n\n[foo]: /url \"title\"\n",
+ "example": 526,
+ "start_line": 7988
+ },
+ {
+ "end_line": 8009,
+ "section": "Links",
+ "html": "foo\n[]
\n",
+ "markdown": "[foo] \n[]\n\n[foo]: /url \"title\"\n",
+ "example": 527,
+ "start_line": 8001
+ },
+ {
+ "end_line": 8027,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[foo]\n\n[foo]: /url \"title\"\n",
+ "example": 528,
+ "start_line": 8021
+ },
+ {
+ "end_line": 8036,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[*foo* bar]\n\n[*foo* bar]: /url \"title\"\n",
+ "example": 529,
+ "start_line": 8030
+ },
+ {
+ "end_line": 8045,
+ "section": "Links",
+ "html": "[foo bar]
\n",
+ "markdown": "[[*foo* bar]]\n\n[*foo* bar]: /url \"title\"\n",
+ "example": 530,
+ "start_line": 8039
+ },
+ {
+ "end_line": 8054,
+ "section": "Links",
+ "html": "[[bar foo
\n",
+ "markdown": "[[bar [foo]\n\n[foo]: /url\n",
+ "example": 531,
+ "start_line": 8048
+ },
+ {
+ "end_line": 8065,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[Foo]\n\n[foo]: /url \"title\"\n",
+ "example": 532,
+ "start_line": 8059
+ },
+ {
+ "end_line": 8076,
+ "section": "Links",
+ "html": "foo bar
\n",
+ "markdown": "[foo] bar\n\n[foo]: /url\n",
+ "example": 533,
+ "start_line": 8070
+ },
+ {
+ "end_line": 8088,
+ "section": "Links",
+ "html": "[foo]
\n",
+ "markdown": "\\[foo]\n\n[foo]: /url \"title\"\n",
+ "example": 534,
+ "start_line": 8082
+ },
+ {
+ "end_line": 8100,
+ "section": "Links",
+ "html": "*foo*
\n",
+ "markdown": "[foo*]: /url\n\n*[foo*]\n",
+ "example": 535,
+ "start_line": 8094
+ },
+ {
+ "end_line": 8113,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[foo][bar]\n\n[foo]: /url1\n[bar]: /url2\n",
+ "example": 536,
+ "start_line": 8106
+ },
+ {
+ "end_line": 8121,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[foo][]\n\n[foo]: /url1\n",
+ "example": 537,
+ "start_line": 8115
+ },
+ {
+ "end_line": 8131,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[foo]()\n\n[foo]: /url1\n",
+ "example": 538,
+ "start_line": 8125
+ },
+ {
+ "end_line": 8139,
+ "section": "Links",
+ "html": "foo(not a link)
\n",
+ "markdown": "[foo](not a link)\n\n[foo]: /url1\n",
+ "example": 539,
+ "start_line": 8133
+ },
+ {
+ "end_line": 8150,
+ "section": "Links",
+ "html": "[foo]bar
\n",
+ "markdown": "[foo][bar][baz]\n\n[baz]: /url\n",
+ "example": 540,
+ "start_line": 8144
+ },
+ {
+ "end_line": 8163,
+ "section": "Links",
+ "html": "\n",
+ "markdown": "[foo][bar][baz]\n\n[baz]: /url1\n[bar]: /url2\n",
+ "example": 541,
+ "start_line": 8156
+ },
+ {
+ "end_line": 8176,
+ "section": "Links",
+ "html": "[foo]bar
\n",
+ "markdown": "[foo][bar][baz]\n\n[baz]: /url1\n[foo]: /url2\n",
+ "example": 542,
+ "start_line": 8169
+ },
+ {
+ "end_line": 8196,
+ "section": "Images",
+ "html": "\n",
+ "markdown": "![foo](/url \"title\")\n",
+ "example": 543,
+ "start_line": 8192
+ },
+ {
+ "end_line": 8205,
+ "section": "Images",
+ "html": "\n",
+ "markdown": "![foo *bar*]\n\n[foo *bar*]: train.jpg \"train & tracks\"\n",
+ "example": 544,
+ "start_line": 8199
+ },
+ {
+ "end_line": 8212,
+ "section": "Images",
+ "html": "\n",
+ "markdown": "![foo ![bar](/url)](/url2)\n",
+ "example": 545,
+ "start_line": 8208
+ },
+ {
+ "end_line": 8219,
+ "section": "Images",
+ "html": "\n",
+ "markdown": "![foo [bar](/url)](/url2)\n",
+ "example": 546,
+ "start_line": 8215
+ },
+ {
+ "end_line": 8235,
+ "section": "Images",
+ "html": "\n",
+ "markdown": "![foo *bar*][]\n\n[foo *bar*]: train.jpg \"train & tracks\"\n",
+ "example": 547,
+ "start_line": 8229
+ },
+ {
+ "end_line": 8244,
+ "section": "Images",
+ "html": "\n",
+ "markdown": "![foo *bar*][foobar]\n\n[FOOBAR]: train.jpg \"train & tracks\"\n",
+ "example": 548,
+ "start_line": 8238
+ },
+ {
+ "end_line": 8251,
+ "section": "Images",
+ "html": "\n",
+ "markdown": "![foo](train.jpg)\n",
+ "example": 549,
+ "start_line": 8247
+ },
+ {
+ "end_line": 8258,
+ "section": "Images",
+ "html": "My
\n",
+ "markdown": "My ![foo bar](/path/to/train.jpg \"title\" )\n",
+ "example": 550,
+ "start_line": 8254
+ },
+ {
+ "end_line": 8265,
+ "section": "Images",
+ "html": "\n",
+ "markdown": "![foo]()\n",
+ "example": 551,
+ "start_line": 8261
+ },
+ {
+ "end_line": 8272,
+ "section": "Images",
+ "html": "\n",
+ "markdown": "![](/url)\n",
+ "example": 552,
+ "start_line": 8268
+ },
+ {
+ "end_line": 8283,
+ "section": "Images",
+ "html": "\n",
+ "markdown": "![foo][bar]\n\n[bar]: /url\n",
+ "example": 553,
+ "start_line": 8277
+ },
+ {
+ "end_line": 8292,
+ "section": "Images",
+ "html": "\n",
+ "markdown": "![foo][bar]\n\n[BAR]: /url\n",
+ "example": 554,
+ "start_line": 8286
+ },
+ {
+ "end_line": 8303,
+ "section": "Images",
+ "html": "\n",
+ "markdown": "![foo][]\n\n[foo]: /url \"title\"\n",
+ "example": 555,
+ "start_line": 8297
+ },
+ {
+ "end_line": 8312,
+ "section": "Images",
+ "html": "\n",
+ "markdown": "![*foo* bar][]\n\n[*foo* bar]: /url \"title\"\n",
+ "example": 556,
+ "start_line": 8306
+ },
+ {
+ "end_line": 8323,
+ "section": "Images",
+ "html": "\n",
+ "markdown": "![Foo][]\n\n[foo]: /url \"title\"\n",
+ "example": 557,
+ "start_line": 8317
+ },
+ {
+ "end_line": 8337,
+ "section": "Images",
+ "html": "\n[]
\n",
+ "markdown": "![foo] \n[]\n\n[foo]: /url \"title\"\n",
+ "example": 558,
+ "start_line": 8329
+ },
+ {
+ "end_line": 8348,
+ "section": "Images",
+ "html": "\n",
+ "markdown": "![foo]\n\n[foo]: /url \"title\"\n",
+ "example": 559,
+ "start_line": 8342
+ },
+ {
+ "end_line": 8357,
+ "section": "Images",
+ "html": "\n",
+ "markdown": "![*foo* bar]\n\n[*foo* bar]: /url \"title\"\n",
+ "example": 560,
+ "start_line": 8351
+ },
+ {
+ "end_line": 8369,
+ "section": "Images",
+ "html": "![[foo]]
\n[[foo]]: /url "title"
\n",
+ "markdown": "![[foo]]\n\n[[foo]]: /url \"title\"\n",
+ "example": 561,
+ "start_line": 8362
+ },
+ {
+ "end_line": 8380,
+ "section": "Images",
+ "html": "\n",
+ "markdown": "![Foo]\n\n[foo]: /url \"title\"\n",
+ "example": 562,
+ "start_line": 8374
+ },
+ {
+ "end_line": 8392,
+ "section": "Images",
+ "html": "![foo]
\n",
+ "markdown": "!\\[foo]\n\n[foo]: /url \"title\"\n",
+ "example": 563,
+ "start_line": 8386
+ },
+ {
+ "end_line": 8404,
+ "section": "Images",
+ "html": "!foo
\n",
+ "markdown": "\\![foo]\n\n[foo]: /url \"title\"\n",
+ "example": 564,
+ "start_line": 8398
+ },
+ {
+ "end_line": 8435,
+ "section": "Autolinks",
+ "html": "\n",
+ "markdown": "\n",
+ "example": 565,
+ "start_line": 8431
+ },
+ {
+ "end_line": 8442,
+ "section": "Autolinks",
+ "html": "http://foo.bar.baz/test?q=hello&id=22&boolean
\n",
+ "markdown": "\n",
+ "example": 566,
+ "start_line": 8438
+ },
+ {
+ "end_line": 8449,
+ "section": "Autolinks",
+ "html": "\n",
+ "markdown": "\n",
+ "example": 567,
+ "start_line": 8445
+ },
+ {
+ "end_line": 8458,
+ "section": "Autolinks",
+ "html": "\n",
+ "markdown": "\n",
+ "example": 568,
+ "start_line": 8454
+ },
+ {
+ "end_line": 8470,
+ "section": "Autolinks",
+ "html": "\n",
+ "markdown": "\n",
+ "example": 569,
+ "start_line": 8466
+ },
+ {
+ "end_line": 8477,
+ "section": "Autolinks",
+ "html": "\n",
+ "markdown": "\n",
+ "example": 570,
+ "start_line": 8473
+ },
+ {
+ "end_line": 8484,
+ "section": "Autolinks",
+ "html": "\n",
+ "markdown": " \n",
+ "example": 571,
+ "start_line": 8480
+ },
+ {
+ "end_line": 8491,
+ "section": "Autolinks",
+ "html": "\n",
+ "markdown": "\n",
+ "example": 572,
+ "start_line": 8487
+ },
+ {
+ "end_line": 8500,
+ "section": "Autolinks",
+ "html": "<http://foo.bar/baz bim>
\n",
+ "markdown": "\n",
+ "example": 573,
+ "start_line": 8496
+ },
+ {
+ "end_line": 8509,
+ "section": "Autolinks",
+ "html": "\n",
+ "markdown": "\n",
+ "example": 574,
+ "start_line": 8505
+ },
+ {
+ "end_line": 8531,
+ "section": "Autolinks",
+ "html": "\n",
+ "markdown": "\n",
+ "example": 575,
+ "start_line": 8527
+ },
+ {
+ "end_line": 8538,
+ "section": "Autolinks",
+ "html": "\n",
+ "markdown": "\n",
+ "example": 576,
+ "start_line": 8534
+ },
+ {
+ "end_line": 8547,
+ "section": "Autolinks",
+ "html": "<foo+@bar.example.com>
\n",
+ "markdown": "\n",
+ "example": 577,
+ "start_line": 8543
+ },
+ {
+ "end_line": 8556,
+ "section": "Autolinks",
+ "html": "<>
\n",
+ "markdown": "<>\n",
+ "example": 578,
+ "start_line": 8552
+ },
+ {
+ "end_line": 8563,
+ "section": "Autolinks",
+ "html": "< http://foo.bar >
\n",
+ "markdown": "< http://foo.bar >\n",
+ "example": 579,
+ "start_line": 8559
+ },
+ {
+ "end_line": 8570,
+ "section": "Autolinks",
+ "html": "<m:abc>
\n",
+ "markdown": "\n",
+ "example": 580,
+ "start_line": 8566
+ },
+ {
+ "end_line": 8577,
+ "section": "Autolinks",
+ "html": "<foo.bar.baz>
\n",
+ "markdown": "\n",
+ "example": 581,
+ "start_line": 8573
+ },
+ {
+ "end_line": 8584,
+ "section": "Autolinks",
+ "html": "http://example.com
\n",
+ "markdown": "http://example.com\n",
+ "example": 582,
+ "start_line": 8580
+ },
+ {
+ "end_line": 8591,
+ "section": "Autolinks",
+ "html": "foo@bar.example.com
\n",
+ "markdown": "foo@bar.example.com\n",
+ "example": 583,
+ "start_line": 8587
+ },
+ {
+ "end_line": 8673,
+ "section": "Raw HTML",
+ "html": "\n",
+ "markdown": "\n",
+ "example": 584,
+ "start_line": 8669
+ },
+ {
+ "end_line": 8682,
+ "section": "Raw HTML",
+ "html": "\n",
+ "markdown": " \n",
+ "example": 585,
+ "start_line": 8678
+ },
+ {
+ "end_line": 8693,
+ "section": "Raw HTML",
+ "html": "\n",
+ "markdown": "\n",
+ "example": 586,
+ "start_line": 8687
+ },
+ {
+ "end_line": 8704,
+ "section": "Raw HTML",
+ "html": "\n",
+ "markdown": "\n",
+ "example": 587,
+ "start_line": 8698
+ },
+ {
+ "end_line": 8713,
+ "section": "Raw HTML",
+ "html": "Foo
\n",
+ "markdown": "Foo \n",
+ "example": 588,
+ "start_line": 8709
+ },
+ {
+ "end_line": 8722,
+ "section": "Raw HTML",
+ "html": "<33> <__>
\n",
+ "markdown": "<33> <__>\n",
+ "example": 589,
+ "start_line": 8718
+ },
+ {
+ "end_line": 8731,
+ "section": "Raw HTML",
+ "html": "<a h*#ref="hi">
\n",
+ "markdown": "\n",
+ "example": 590,
+ "start_line": 8727
+ },
+ {
+ "end_line": 8740,
+ "section": "Raw HTML",
+ "html": "<a href="hi'> <a href=hi'>
\n",
+ "markdown": " \n",
+ "example": 591,
+ "start_line": 8736
+ },
+ {
+ "end_line": 8751,
+ "section": "Raw HTML",
+ "html": "< a><\nfoo><bar/ >
\n",
+ "markdown": "< a><\nfoo>\n",
+ "example": 592,
+ "start_line": 8745
+ },
+ {
+ "end_line": 8760,
+ "section": "Raw HTML",
+ "html": "<a href='bar'title=title>
\n",
+ "markdown": "\n",
+ "example": 593,
+ "start_line": 8756
+ },
+ {
+ "end_line": 8769,
+ "section": "Raw HTML",
+ "html": " \n",
+ "markdown": " \n",
+ "example": 594,
+ "start_line": 8765
+ },
+ {
+ "end_line": 8778,
+ "section": "Raw HTML",
+ "html": "</a href="foo">
\n",
+ "markdown": "\n",
+ "example": 595,
+ "start_line": 8774
+ },
+ {
+ "end_line": 8789,
+ "section": "Raw HTML",
+ "html": "foo
\n",
+ "markdown": "foo \n",
+ "example": 596,
+ "start_line": 8783
+ },
+ {
+ "end_line": 8796,
+ "section": "Raw HTML",
+ "html": "foo <!-- not a comment -- two hyphens -->
\n",
+ "markdown": "foo \n",
+ "example": 597,
+ "start_line": 8792
+ },
+ {
+ "end_line": 8808,
+ "section": "Raw HTML",
+ "html": "foo <!--> foo -->
\nfoo <!-- foo--->
\n",
+ "markdown": "foo foo -->\n\nfoo \n",
+ "example": 598,
+ "start_line": 8801
+ },
+ {
+ "end_line": 8817,
+ "section": "Raw HTML",
+ "html": "foo
\n",
+ "markdown": "foo \n",
+ "example": 599,
+ "start_line": 8813
+ },
+ {
+ "end_line": 8826,
+ "section": "Raw HTML",
+ "html": "foo
\n",
+ "markdown": "foo \n",
+ "example": 600,
+ "start_line": 8822
+ },
+ {
+ "end_line": 8835,
+ "section": "Raw HTML",
+ "html": "foo &<]]>
\n",
+ "markdown": "foo &<]]>\n",
+ "example": 601,
+ "start_line": 8831
+ },
+ {
+ "end_line": 8845,
+ "section": "Raw HTML",
+ "html": "\n",
+ "markdown": "foo \n",
+ "example": 602,
+ "start_line": 8841
+ },
+ {
+ "end_line": 8854,
+ "section": "Raw HTML",
+ "html": "\n",
+ "markdown": "foo \n",
+ "example": 603,
+ "start_line": 8850
+ },
+ {
+ "end_line": 8861,
+ "section": "Raw HTML",
+ "html": "<a href=""">
\n",
+ "markdown": "\n",
+ "example": 604,
+ "start_line": 8857
+ },
+ {
+ "end_line": 8877,
+ "section": "Hard line breaks",
+ "html": "foo
\nbaz
\n",
+ "markdown": "foo \nbaz\n",
+ "example": 605,
+ "start_line": 8871
+ },
+ {
+ "end_line": 8889,
+ "section": "Hard line breaks",
+ "html": "foo
\nbaz
\n",
+ "markdown": "foo\\\nbaz\n",
+ "example": 606,
+ "start_line": 8883
+ },
+ {
+ "end_line": 8900,
+ "section": "Hard line breaks",
+ "html": "foo
\nbaz
\n",
+ "markdown": "foo \nbaz\n",
+ "example": 607,
+ "start_line": 8894
+ },
+ {
+ "end_line": 8911,
+ "section": "Hard line breaks",
+ "html": "foo
\nbar
\n",
+ "markdown": "foo \n bar\n",
+ "example": 608,
+ "start_line": 8905
+ },
+ {
+ "end_line": 8920,
+ "section": "Hard line breaks",
+ "html": "foo
\nbar
\n",
+ "markdown": "foo\\\n bar\n",
+ "example": 609,
+ "start_line": 8914
+ },
+ {
+ "end_line": 8932,
+ "section": "Hard line breaks",
+ "html": "foo
\nbar
\n",
+ "markdown": "*foo \nbar*\n",
+ "example": 610,
+ "start_line": 8926
+ },
+ {
+ "end_line": 8941,
+ "section": "Hard line breaks",
+ "html": "foo
\nbar
\n",
+ "markdown": "*foo\\\nbar*\n",
+ "example": 611,
+ "start_line": 8935
+ },
+ {
+ "end_line": 8951,
+ "section": "Hard line breaks",
+ "html": "code span
\n",
+ "markdown": "`code \nspan`\n",
+ "example": 612,
+ "start_line": 8946
+ },
+ {
+ "end_line": 8959,
+ "section": "Hard line breaks",
+ "html": "code\\ span
\n",
+ "markdown": "`code\\\nspan`\n",
+ "example": 613,
+ "start_line": 8954
+ },
+ {
+ "end_line": 8970,
+ "section": "Hard line breaks",
+ "html": "\n",
+ "markdown": "\n",
+ "example": 614,
+ "start_line": 8964
+ },
+ {
+ "end_line": 8979,
+ "section": "Hard line breaks",
+ "html": "\n",
+ "markdown": "\n",
+ "example": 615,
+ "start_line": 8973
+ },
+ {
+ "end_line": 8990,
+ "section": "Hard line breaks",
+ "html": "foo\\
\n",
+ "markdown": "foo\\\n",
+ "example": 616,
+ "start_line": 8986
+ },
+ {
+ "end_line": 8997,
+ "section": "Hard line breaks",
+ "html": "foo
\n",
+ "markdown": "foo \n",
+ "example": 617,
+ "start_line": 8993
+ },
+ {
+ "end_line": 9004,
+ "section": "Hard line breaks",
+ "html": "foo\\
\n",
+ "markdown": "### foo\\\n",
+ "example": 618,
+ "start_line": 9000
+ },
+ {
+ "end_line": 9011,
+ "section": "Hard line breaks",
+ "html": "foo
\n",
+ "markdown": "### foo \n",
+ "example": 619,
+ "start_line": 9007
+ },
+ {
+ "end_line": 9028,
+ "section": "Soft line breaks",
+ "html": "foo\nbaz
\n",
+ "markdown": "foo\nbaz\n",
+ "example": 620,
+ "start_line": 9022
+ },
+ {
+ "end_line": 9040,
+ "section": "Soft line breaks",
+ "html": "foo\nbaz
\n",
+ "markdown": "foo \n baz\n",
+ "example": 621,
+ "start_line": 9034
+ },
+ {
+ "end_line": 9058,
+ "section": "Textual content",
+ "html": "hello $.;'there
\n",
+ "markdown": "hello $.;'there\n",
+ "example": 622,
+ "start_line": 9054
+ },
+ {
+ "end_line": 9065,
+ "section": "Textual content",
+ "html": "Foo χρῆν
\n",
+ "markdown": "Foo χρῆν\n",
+ "example": 623,
+ "start_line": 9061
+ },
+ {
+ "end_line": 9074,
+ "section": "Textual content",
+ "html": "Multiple spaces
\n",
+ "markdown": "Multiple spaces\n",
+ "example": 624,
+ "start_line": 9070
+ }
+]
diff --git a/test/functional/makehtml/cases/features/#164.1.simple-autolink.html b/test/functional/makehtml/cases/features/#164.1.simple-autolink.html
index 17aa55e..2617c51 100644
--- a/test/functional/makehtml/cases/features/#164.1.simple-autolink.html
+++ b/test/functional/makehtml/cases/features/#164.1.simple-autolink.html
@@ -2,5 +2,4 @@
www.foobar
-
-
+
diff --git a/test/functional/makehtml/cases/features/#164.1.simple-autolink.md b/test/functional/makehtml/cases/features/#164.1.simple-autolink.md
index 25b9f86..7f3e727 100644
--- a/test/functional/makehtml/cases/features/#164.1.simple-autolink.md
+++ b/test/functional/makehtml/cases/features/#164.1.simple-autolink.md
@@ -7,5 +7,3 @@ www.foobar.com
http://foobar.com
https://www.foobar.com/baz?bazinga=nhecos;
-
-http://www.google.com
diff --git a/test/functional/makehtml/cases/features/#355.simplifiedAutoLink-URLs-inside-parenthesis-followed-by-another-character-are-not-parsed-correctly.html b/test/functional/makehtml/cases/features/#355.simplifiedAutoLink-URLs-inside-parenthesis-followed-by-another-character-are-not-parsed-correctly.html
new file mode 100644
index 0000000..ed71017
--- /dev/null
+++ b/test/functional/makehtml/cases/features/#355.simplifiedAutoLink-URLs-inside-parenthesis-followed-by-another-character-are-not-parsed-correctly.html
@@ -0,0 +1 @@
+
diff --git a/test/functional/makehtml/cases/features/#355.simplifiedAutoLink-URLs-inside-parenthesis-followed-by-another-character-are-not-parsed-correctly.md b/test/functional/makehtml/cases/features/#355.simplifiedAutoLink-URLs-inside-parenthesis-followed-by-another-character-are-not-parsed-correctly.md
new file mode 100644
index 0000000..9cb34bf
--- /dev/null
+++ b/test/functional/makehtml/cases/features/#355.simplifiedAutoLink-URLs-inside-parenthesis-followed-by-another-character-are-not-parsed-correctly.md
@@ -0,0 +1 @@
+(https://www.google.com)!
diff --git a/test/functional/makehtml/cases/features/simplifiedAutoLink/codespans.html b/test/functional/makehtml/cases/features/simplifiedAutoLink/codespans.html
new file mode 100644
index 0000000..71d4d02
--- /dev/null
+++ b/test/functional/makehtml/cases/features/simplifiedAutoLink/codespans.html
@@ -0,0 +1 @@
+http://www.gmail.com
diff --git a/test/functional/makehtml/cases/features/simplifiedAutoLink/codespans.md b/test/functional/makehtml/cases/features/simplifiedAutoLink/codespans.md
new file mode 100644
index 0000000..5ef4e45
--- /dev/null
+++ b/test/functional/makehtml/cases/features/simplifiedAutoLink/codespans.md
@@ -0,0 +1 @@
+`http://www.gmail.com`
diff --git a/test/functional/makehtml/cases/features/simplifiedAutoLink/complete-test-case.html b/test/functional/makehtml/cases/features/simplifiedAutoLink/complete-test-case.html
index 4d068ff..00bd8f6 100644
--- a/test/functional/makehtml/cases/features/simplifiedAutoLink/complete-test-case.html
+++ b/test/functional/makehtml/cases/features/simplifiedAutoLink/complete-test-case.html
@@ -28,9 +28,9 @@
http://foo.bar/?q=Test%20URL-encoded%20stuff
-
-
-
+
+
+
@@ -41,6 +41,8 @@
http://foo.bar/foo(bar)baz quux
http://foo.bar?q=Spaces should be encoded
+http://.www.foo.bar/
+http://.www.foo.bar./
@@ -73,7 +75,4 @@
:// should fail
http://-error-.invalid/
http://-a.b.co
-http://a.b-.co
http://3628126748
-http://.www.foo.bar/
-http://.www.foo.bar./
diff --git a/test/functional/makehtml/cases/features/simplifiedAutoLink/complete-test-case.md b/test/functional/makehtml/cases/features/simplifiedAutoLink/complete-test-case.md
index 5a8232b..a2e3c75 100644
--- a/test/functional/makehtml/cases/features/simplifiedAutoLink/complete-test-case.md
+++ b/test/functional/makehtml/cases/features/simplifiedAutoLink/complete-test-case.md
@@ -58,11 +58,11 @@ ftp://foo.bar/baz
http://foo.bar/?q=Test%20URL-encoded%20stuff
-http://مثال.إختبار
+
-http://例子.测试
+
-http://उदाहरण.परीक्षा
+
http://1337.net
@@ -72,7 +72,6 @@ http://223.255.255.254
https://foo_bar.example.com/
-
http://www.foo.bar./
@@ -85,6 +84,10 @@ http://foo.bar/foo(bar)baz quux
http://foo.bar?q=Spaces should be encoded
+http://.www.foo.bar/
+
+http://.www.foo.bar./
+
http://10.1.1.1
@@ -149,10 +152,4 @@ http://-error-.invalid/
http://-a.b.co
-http://a.b-.co
-
http://3628126748
-
-http://.www.foo.bar/
-
-http://.www.foo.bar./
diff --git a/test/functional/makehtml/cases/features/simplifiedAutoLink/trailing-punctuation.html b/test/functional/makehtml/cases/features/simplifiedAutoLink/trailing-punctuation.html
new file mode 100644
index 0000000..3159860
--- /dev/null
+++ b/test/functional/makehtml/cases/features/simplifiedAutoLink/trailing-punctuation.html
@@ -0,0 +1,8 @@
+
+http://www.google.com!!!!!!!!!!!!!!!!
+http://www.google.com/!!!!!!!!!!!!!!!!foobar
+http://www.google.com/!!!!!!!!!!!!!!!! foobar
+
+
+
+
diff --git a/test/functional/makehtml/cases/features/simplifiedAutoLink/trailing-punctuation.md b/test/functional/makehtml/cases/features/simplifiedAutoLink/trailing-punctuation.md
new file mode 100644
index 0000000..8fdd396
--- /dev/null
+++ b/test/functional/makehtml/cases/features/simplifiedAutoLink/trailing-punctuation.md
@@ -0,0 +1,15 @@
+http://www.google.com!
+
+http://www.google.com!!!!!!!!!!!!!!!!
+
+http://www.google.com/!!!!!!!!!!!!!!!!foobar
+
+http://www.google.com/!!!!!!!!!!!!!!!! foobar
+
+(http://www.google.com/?!.)
+
+http://www.google.com/?!.(
+
+http://www.google.com/a()
+
+http://www.google.com/a?!.()
diff --git a/test/functional/makehtml/cases/features/simplifiedAutoLink/wrapping-parenthesis.html b/test/functional/makehtml/cases/features/simplifiedAutoLink/wrapping-parenthesis.html
new file mode 100644
index 0000000..ca067df
--- /dev/null
+++ b/test/functional/makehtml/cases/features/simplifiedAutoLink/wrapping-parenthesis.html
@@ -0,0 +1,2 @@
+
+
diff --git a/test/functional/makehtml/cases/features/simplifiedAutoLink/wrapping-parenthesis.md b/test/functional/makehtml/cases/features/simplifiedAutoLink/wrapping-parenthesis.md
new file mode 100644
index 0000000..757b079
--- /dev/null
+++ b/test/functional/makehtml/cases/features/simplifiedAutoLink/wrapping-parenthesis.md
@@ -0,0 +1,5 @@
+(https://www.google.com)
+
+(https://www.google.com!?;)
+
+
diff --git a/test/functional/makehtml/cases/ghost/underscore.html b/test/functional/makehtml/cases/ghost/underscore.html
index 5033d29..0ca7df1 100644
--- a/test/functional/makehtml/cases/ghost/underscore.html
+++ b/test/functional/makehtml/cases/ghost/underscore.html
@@ -17,7 +17,7 @@
var foo_bar_baz_bar_foo = "foo_bar_";
foo_bar_baz foo_bar_baz_bar_foo foo_bar baz_bar baz_foo
-foo_bar_baz foo_bar_baz_bar_foo foo_bar baz_bar baz_foo
+foo_bar_baz foo_bar_baz_bar_foo _foo_bar baz_bar_ baz_foo
foo_bar_baz foo_bar_baz_bar_foo foo_bar baz_bar baz_foo
foo_bar_baz foo_bar_baz_bar_foo foo_bar baz_bar baz_foo
diff --git a/test/functional/makehtml/cases/issues/#390.brackets-in-URL-break-links.html b/test/functional/makehtml/cases/issues/#390.brackets-in-URL-break-links.html
index acff8f9..9ecb5d4 100644
--- a/test/functional/makehtml/cases/issues/#390.brackets-in-URL-break-links.html
+++ b/test/functional/makehtml/cases/issues/#390.brackets-in-URL-break-links.html
@@ -1,3 +1,4 @@
This is a link.
-This is another link.
-
+This is another link2.
+
+link4(this should work)
diff --git a/test/functional/makehtml/cases/issues/#390.brackets-in-URL-break-links.md b/test/functional/makehtml/cases/issues/#390.brackets-in-URL-break-links.md
index 338fcdd..7f8f6c5 100644
--- a/test/functional/makehtml/cases/issues/#390.brackets-in-URL-break-links.md
+++ b/test/functional/makehtml/cases/issues/#390.brackets-in-URL-break-links.md
@@ -2,6 +2,8 @@ This is a [link][].
[link]: https://en.wikipedia.org/wiki/Textile_(markup_language) "Textile"
-This is another [link](https://en.wikipedia.org/wiki/Textile_(markup_language) "Textile").
+This is another [link2](https://en.wikipedia.org/wiki/Textile_(markup_language) "Textile").
-[link](<./image/cat1).png> "title")
+[link3](<./image/cat1).png> "title")
+
+[link4](https://en.wikipedia.org/wiki/Textile_(markup_language) "Textile")(this should work)
diff --git a/test/functional/makehtml/cases/issues/crazy-urls.html b/test/functional/makehtml/cases/issues/crazy-urls.html
index d5a1f3a..0fd2e52 100644
--- a/test/functional/makehtml/cases/issues/crazy-urls.html
+++ b/test/functional/makehtml/cases/issues/crazy-urls.html
@@ -12,3 +12,8 @@
+
+
+
+
+
diff --git a/test/functional/makehtml/cases/issues/crazy-urls.md b/test/functional/makehtml/cases/issues/crazy-urls.md
index 3299d5b..61e44f7 100644
--- a/test/functional/makehtml/cases/issues/crazy-urls.md
+++ b/test/functional/makehtml/cases/issues/crazy-urls.md
@@ -25,3 +25,13 @@
![empty](< > "title")
[empty](< > "title")
+
+[empty]()
+
+[empty]("title")
+
+[]()
+
+[](<>)
+
+[]("title")
diff --git a/test/functional/makehtml/cases/standard/anchors-followed-by-brakets.md b/test/functional/makehtml/cases/standard/anchors-followed-by-brakets.md
index 974fdd3..8b0b851 100644
--- a/test/functional/makehtml/cases/standard/anchors-followed-by-brakets.md
+++ b/test/functional/makehtml/cases/standard/anchors-followed-by-brakets.md
@@ -4,4 +4,4 @@ This is a [link](https://en.wikipedia.org/wiki/Textile_(markup) (some other text
This is a [link](https://en.wikipedia.org/wiki/Textile_(markup_language)) (some other text)
-This is a [link](https://en.wikipedia.org/wiki/Textile_(markup_language)/foo) (some other text)
\ No newline at end of file
+This is a [link](https://en.wikipedia.org/wiki/Textile_(markup_language)/foo) (some other text)
diff --git a/test/functional/makehtml/makehtml.bootstrap.js b/test/functional/makehtml/makehtml.bootstrap.js
index c518c8a..a4a092d 100644
--- a/test/functional/makehtml/makehtml.bootstrap.js
+++ b/test/functional/makehtml/makehtml.bootstrap.js
@@ -16,6 +16,11 @@
.map(map(dir));
}
+ function getJsonTestSuite (file) {
+ var json = JSON.parse(fs.readFileSync(file, 'utf8'));
+ return mapJson(json, file);
+ }
+
function filter () {
return function (file) {
var ext = file.slice(-3);
@@ -25,7 +30,8 @@
function map (dir) {
return function (file) {
- var name = file.replace('.md', ''),
+ var oFile = 'file://' + process.cwd().replace(/\\/g, '/') + dir + file,
+ name = file.replace('.md', ''),
htmlPath = dir + name + '.html',
html = fs.readFileSync(htmlPath, 'utf8'),
mdPath = dir + name + '.md',
@@ -34,18 +40,40 @@
return {
name: name,
input: md,
- expected: html
+ expected: html,
+ file: oFile
};
};
}
+ function mapJson (jsonArray, file) {
+ var tcObj = {};
+ for (var i = 0; i < jsonArray.length; ++i) {
+ var section = jsonArray[i].section;
+ var name = jsonArray[i].section + '_' + jsonArray[i].example;
+ var md = jsonArray[i].markdown;
+ var html = jsonArray[i].html;
+ if (!tcObj.hasOwnProperty(section)) {
+ tcObj[section] = [];
+ }
+ tcObj[section].push({
+ name: name,
+ input: md,
+ expected: html,
+ file: process.cwd().replace(/\\/g, '/') + file
+ });
+ }
+ return tcObj;
+ }
+
+
function assertion (testCase, converter) {
return function () {
testCase.actual = converter.makeHtml(testCase.input);
testCase = normalize(testCase);
// Compare
- testCase.actual.should.equal(testCase.expected);
+ testCase.actual.should.equal(testCase.expected, testCase.file);
};
}
@@ -81,6 +109,7 @@
module.exports = {
getTestSuite: getTestSuite,
+ getJsonTestSuite: getJsonTestSuite,
assertion: assertion,
normalize: normalize,
showdown: require('../../../.build/showdown.js')
diff --git a/test/functional/makehtml/testsuite.commonmark.js b/test/functional/makehtml/testsuite.commonmark.js
new file mode 100644
index 0000000..4fea337
--- /dev/null
+++ b/test/functional/makehtml/testsuite.commonmark.js
@@ -0,0 +1,25 @@
+/**
+ * Created by Estevao on 08-06-2015.
+ */
+
+// jshint ignore: start
+/*
+var bootstrap = require('./makehtml.bootstrap.js'),
+ converter = new bootstrap.showdown.Converter(),
+ assertion = bootstrap.assertion,
+ testsuite = bootstrap.getJsonTestSuite('test/functional/makehtml/cases/commonmark.testsuite.json');
+
+describe('makeHtml() commonmark testsuite', function () {
+ 'use strict';
+
+ for (var section in testsuite) {
+ if (testsuite.hasOwnProperty(section)) {
+ describe(section, function () {
+ for (var i = 0; i < testsuite[section].length; ++i) {
+ it(testsuite[section][i].name, assertion(testsuite[section][i], converter));
+ }
+ });
+ }
+ }
+});
+*/
diff --git a/test/functional/makehtml/testsuite.features.js b/test/functional/makehtml/testsuite.features.js
index 7f4807d..4affe1c 100644
--- a/test/functional/makehtml/testsuite.features.js
+++ b/test/functional/makehtml/testsuite.features.js
@@ -62,7 +62,7 @@ describe('makeHtml() features testsuite', function () {
} else if (testsuite[i].name === 'simpleLineBreaks-handle-html-pre') {
converter = new showdown.Converter({simpleLineBreaks: true});
} else if (testsuite[i].name === 'excludeTrailingPunctuationFromURLs-option') {
- converter = new showdown.Converter({simplifiedAutoLink: true, excludeTrailingPunctuationFromURLs: true});
+ converter = new showdown.Converter({simplifiedAutoLink: true});
} else if (testsuite[i].name === 'requireSpaceBeforeHeadingText') {
converter = new showdown.Converter({requireSpaceBeforeHeadingText: true});
} else if (testsuite[i].name === '#320.github-compatible-generated-header-id') {
@@ -88,11 +88,13 @@ describe('makeHtml() features testsuite', function () {
} else if (testsuite[i].name === 'customizedHeaderId-simple') {
converter = new showdown.Converter({customizedHeaderId: true});
} else if (testsuite[i].name === '#378.simplifiedAutoLinks-with-excludeTrailingPunctuationFromURLs') {
- converter = new showdown.Converter({simplifiedAutoLink: true, excludeTrailingPunctuationFromURLs: true});
+ converter = new showdown.Converter({simplifiedAutoLink: true});
} else if (testsuite[i].name === '#374.escape-html-tags') {
converter = new showdown.Converter({backslashEscapesHTMLTags: true});
} else if (testsuite[i].name === '#379.openLinksInNewWindow-breaks-em-markdup') {
converter = new showdown.Converter({openLinksInNewWindow: true});
+ } else if (testsuite[i].name === '#355.simplifiedAutoLink-URLs-inside-parenthesis-followed-by-another-character-are-not-parsed-correctly') {
+ converter = new showdown.Converter({simplifiedAutoLink: true});
} else {
converter = new showdown.Converter();
}