2015-06-17 08:22:05 +08:00
|
|
|
/**
|
|
|
|
* Created by Estevao on 08-06-2015.
|
|
|
|
*/
|
2017-12-22 23:28:41 +08:00
|
|
|
var bootstrap = require('./makehtml.bootstrap.js'),
|
2015-07-12 02:32:22 +08:00
|
|
|
showdown = bootstrap.showdown,
|
2015-06-17 08:22:05 +08:00
|
|
|
assertion = bootstrap.assertion,
|
2017-12-23 20:35:31 +08:00
|
|
|
testsuite = bootstrap.getTestSuite('test/functional/makehtml/cases/features/'),
|
|
|
|
tableSuite = bootstrap.getTestSuite('test/functional/makehtml/cases/features/tables/'),
|
|
|
|
simplifiedAutoLinkSuite = bootstrap.getTestSuite('test/functional/makehtml/cases/features/simplifiedAutoLink/'),
|
|
|
|
openLinksInNewWindowSuite = bootstrap.getTestSuite('test/functional/makehtml/cases/features/openLinksInNewWindow/'),
|
|
|
|
disableForced4SpacesIndentedSublistsSuite = bootstrap.getTestSuite('test/functional/makehtml/cases/features/disableForced4SpacesIndentedSublists/'),
|
|
|
|
rawHeaderIdSuite = bootstrap.getTestSuite('test/functional/makehtml/cases/features/rawHeaderId/'),
|
|
|
|
rawPrefixHeaderIdSuite = bootstrap.getTestSuite('test/functional/makehtml/cases/features/rawPrefixHeaderId/'),
|
|
|
|
emojisSuite = bootstrap.getTestSuite('test/functional/makehtml/cases/features/emojis/'),
|
|
|
|
underlineSuite = bootstrap.getTestSuite('test/functional/makehtml/cases/features/underline/'),
|
2019-10-04 22:45:27 +08:00
|
|
|
ellipsisSuite = bootstrap.getTestSuite('test/functional/makehtml/cases/features/ellipsis/'),
|
2017-12-23 20:35:31 +08:00
|
|
|
literalMidWordUnderscoresSuite = bootstrap.getTestSuite('test/functional/makehtml/cases/features/literalMidWordUnderscores/'),
|
2018-09-15 05:46:03 +08:00
|
|
|
//literalMidWordAsterisksSuite = bootstrap.getTestSuite('test/functional/makehtml/cases/features/literalMidWordAsterisks/'),
|
2017-12-23 20:35:31 +08:00
|
|
|
completeHTMLOutputSuite = bootstrap.getTestSuite('test/functional/makehtml/cases/features/completeHTMLOutput/'),
|
|
|
|
metadataSuite = bootstrap.getTestSuite('test/functional/makehtml/cases/features/metadata/'),
|
2021-11-15 04:17:19 +08:00
|
|
|
splitAdjacentBlockquotesSuite = bootstrap.getTestSuite('test/functional/makehtml/cases/features/splitAdjacentBlockquotes/'),
|
2022-02-24 09:57:08 +08:00
|
|
|
moreStyling = bootstrap.getTestSuite('test/functional/makehtml/cases/features/moreStyling/'),
|
2021-11-15 04:17:19 +08:00
|
|
|
http = require('http'),
|
|
|
|
https = require('https'),
|
|
|
|
expect = require('chai').expect;
|
2015-06-17 08:22:05 +08:00
|
|
|
|
|
|
|
describe('makeHtml() features testsuite', function () {
|
|
|
|
'use strict';
|
2017-02-27 03:13:52 +08:00
|
|
|
|
|
|
|
describe('issues', function () {
|
|
|
|
for (var i = 0; i < testsuite.length; ++i) {
|
|
|
|
var converter;
|
|
|
|
if (testsuite[i].name === '#143.support-image-dimensions') {
|
|
|
|
converter = new showdown.Converter({parseImgDimensions: true});
|
|
|
|
} else if (testsuite[i].name === '#69.header-level-start') {
|
|
|
|
converter = new showdown.Converter({headerLevelStart: 3});
|
|
|
|
} else if (testsuite[i].name === '#164.1.simple-autolink' || testsuite[i].name === '#204.certain-links-with-at-and-dot-break-url') {
|
|
|
|
converter = new showdown.Converter({simplifiedAutoLink: true});
|
2017-08-05 09:52:03 +08:00
|
|
|
} else if (testsuite[i].name === 'literalMidWordUnderscores') {
|
|
|
|
converter = new showdown.Converter({literalMidWordUnderscores: true});
|
2017-02-27 03:13:52 +08:00
|
|
|
} else if (testsuite[i].name === '#164.2.disallow-underscore-emphasis-mid-word') {
|
|
|
|
converter = new showdown.Converter({literalMidWordUnderscores: true});
|
|
|
|
} else if (testsuite[i].name === '#164.3.strikethrough' || testsuite[i].name === '#214.escaped-markdown-chars-break-strikethrough') {
|
|
|
|
converter = new showdown.Converter({strikethrough: true});
|
|
|
|
} else if (testsuite[i].name === 'disable-gh-codeblocks') {
|
|
|
|
converter = new showdown.Converter({ghCodeBlocks: false});
|
|
|
|
} else if (testsuite[i].name === '#164.4.tasklists') {
|
|
|
|
converter = new showdown.Converter({tasklists: true});
|
|
|
|
} else if (testsuite[i].name === '#198.literalMidWordUnderscores-changes-behavior-of-asterisk') {
|
|
|
|
converter = new showdown.Converter({literalMidWordUnderscores: true});
|
|
|
|
} else if (testsuite[i].name === '#259.es6-template-strings-indentation-issues') {
|
|
|
|
converter = new showdown.Converter({smartIndentationFix: true});
|
|
|
|
} else if (testsuite[i].name === '#284.simplifiedAutoLink-does-not-match-GFM-style') {
|
|
|
|
converter = new showdown.Converter({simplifiedAutoLink: true});
|
|
|
|
} else if (testsuite[i].name === 'disableForced4SpacesIndentedSublists') {
|
|
|
|
converter = new showdown.Converter({disableForced4SpacesIndentedSublists: true});
|
|
|
|
} else if (testsuite[i].name === '#206.treat-single-line-breaks-as-br') {
|
|
|
|
converter = new showdown.Converter({simpleLineBreaks: true});
|
|
|
|
} else if (testsuite[i].name === 'simpleLineBreaks2') {
|
|
|
|
converter = new showdown.Converter({simpleLineBreaks: true});
|
|
|
|
} else if (testsuite[i].name === '#316.new-simpleLineBreaks-option-breaks-lists') {
|
|
|
|
converter = new showdown.Converter({simpleLineBreaks: true});
|
|
|
|
} else if (testsuite[i].name === '#323.simpleLineBreaks-breaks-with-strong') {
|
|
|
|
converter = new showdown.Converter({simpleLineBreaks: true});
|
|
|
|
} else if (testsuite[i].name === '#318.simpleLineBreaks-does-not-work-with-chinese-characters') {
|
|
|
|
converter = new showdown.Converter({simpleLineBreaks: true});
|
|
|
|
} else if (testsuite[i].name === 'simpleLineBreaks-handle-html-pre') {
|
|
|
|
converter = new showdown.Converter({simpleLineBreaks: true});
|
|
|
|
} else if (testsuite[i].name === 'excludeTrailingPunctuationFromURLs-option') {
|
2018-09-25 11:04:59 +08:00
|
|
|
converter = new showdown.Converter({simplifiedAutoLink: true});
|
2017-02-27 03:13:52 +08:00
|
|
|
} else if (testsuite[i].name === 'requireSpaceBeforeHeadingText') {
|
|
|
|
converter = new showdown.Converter({requireSpaceBeforeHeadingText: true});
|
|
|
|
} else if (testsuite[i].name === '#320.github-compatible-generated-header-id') {
|
|
|
|
converter = new showdown.Converter({ghCompatibleHeaderId: true});
|
|
|
|
} else if (testsuite[i].name === 'ghMentions') {
|
|
|
|
converter = new showdown.Converter({ghMentions: true});
|
|
|
|
} else if (testsuite[i].name === 'disable-email-encoding') {
|
|
|
|
converter = new showdown.Converter({encodeEmails: false});
|
|
|
|
} else if (testsuite[i].name === '#330.simplifiedAutoLink-drops-character-before-and-after-linked-mail') {
|
|
|
|
converter = new showdown.Converter({encodeEmails: false, simplifiedAutoLink: true});
|
|
|
|
} else if (testsuite[i].name === '#331.allow-escaping-of-tilde') {
|
|
|
|
converter = new showdown.Converter({strikethrough: true});
|
|
|
|
} else if (testsuite[i].name === 'prefixHeaderId-simple') {
|
|
|
|
converter = new showdown.Converter({prefixHeaderId: true});
|
|
|
|
} else if (testsuite[i].name === 'prefixHeaderId-string') {
|
|
|
|
converter = new showdown.Converter({prefixHeaderId: 'my-prefix-'});
|
|
|
|
} else if (testsuite[i].name === 'prefixHeaderId-string-and-ghCompatibleHeaderId') {
|
|
|
|
converter = new showdown.Converter({prefixHeaderId: 'my-prefix-', ghCompatibleHeaderId: true});
|
|
|
|
} else if (testsuite[i].name === 'prefixHeaderId-string-and-ghCompatibleHeaderId2') {
|
|
|
|
converter = new showdown.Converter({prefixHeaderId: 'my prefix ', ghCompatibleHeaderId: true});
|
|
|
|
} else if (testsuite[i].name === 'simplifiedAutoLink') {
|
|
|
|
converter = new showdown.Converter({simplifiedAutoLink: true, strikethrough: true});
|
2017-06-01 09:35:42 +08:00
|
|
|
} else if (testsuite[i].name === 'customizedHeaderId-simple') {
|
|
|
|
converter = new showdown.Converter({customizedHeaderId: true});
|
2017-04-23 09:14:56 +08:00
|
|
|
} else if (testsuite[i].name === '#378.simplifiedAutoLinks-with-excludeTrailingPunctuationFromURLs') {
|
2018-09-25 11:04:59 +08:00
|
|
|
converter = new showdown.Converter({simplifiedAutoLink: true});
|
2017-06-02 11:48:53 +08:00
|
|
|
} else if (testsuite[i].name === '#374.escape-html-tags') {
|
|
|
|
converter = new showdown.Converter({backslashEscapesHTMLTags: true});
|
2017-04-26 05:13:27 +08:00
|
|
|
} else if (testsuite[i].name === '#379.openLinksInNewWindow-breaks-em-markdup') {
|
|
|
|
converter = new showdown.Converter({openLinksInNewWindow: true});
|
2018-09-25 11:04:59 +08:00
|
|
|
} else if (testsuite[i].name === '#355.simplifiedAutoLink-URLs-inside-parenthesis-followed-by-another-character-are-not-parsed-correctly') {
|
|
|
|
converter = new showdown.Converter({simplifiedAutoLink: true});
|
2019-03-15 00:56:33 +08:00
|
|
|
} else if (testsuite[i].name === 'relativePathBaseUrl') {
|
|
|
|
converter = new showdown.Converter({relativePathBaseUrl: 'http://my.site.com/'});
|
2017-02-27 03:13:52 +08:00
|
|
|
} else {
|
|
|
|
converter = new showdown.Converter();
|
|
|
|
}
|
|
|
|
it(testsuite[i].name.replace(/-/g, ' '), assertion(testsuite[i], converter));
|
2015-06-17 08:22:05 +08:00
|
|
|
}
|
2017-02-27 03:13:52 +08:00
|
|
|
});
|
2015-07-11 23:44:24 +08:00
|
|
|
|
2017-10-24 23:46:40 +08:00
|
|
|
/** test Table Syntax Support **/
|
2015-07-11 23:44:24 +08:00
|
|
|
describe('table support', function () {
|
2017-02-27 03:13:52 +08:00
|
|
|
var converter,
|
|
|
|
suite = tableSuite;
|
|
|
|
for (var i = 0; i < suite.length; ++i) {
|
|
|
|
if (suite[i].name === 'basic-with-header-ids') {
|
2017-08-05 03:19:15 +08:00
|
|
|
converter = new showdown.Converter({tables: true, tablesHeaderId: true});
|
2017-02-27 03:13:52 +08:00
|
|
|
} else if (suite[i].name === '#179.parse-md-in-table-ths') {
|
2015-07-22 19:03:38 +08:00
|
|
|
converter = new showdown.Converter({tables: true, strikethrough: true});
|
2015-07-12 01:21:43 +08:00
|
|
|
} else {
|
|
|
|
converter = new showdown.Converter({tables: true});
|
|
|
|
}
|
2017-02-27 03:13:52 +08:00
|
|
|
it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter));
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2017-10-24 23:46:40 +08:00
|
|
|
/** test simplifiedAutoLink Support **/
|
2017-02-27 03:13:52 +08:00
|
|
|
describe('simplifiedAutoLink support in', function () {
|
|
|
|
var converter,
|
|
|
|
suite = simplifiedAutoLinkSuite;
|
|
|
|
for (var i = 0; i < suite.length; ++i) {
|
|
|
|
if (suite[i].name === 'emphasis-and-strikethrough') {
|
|
|
|
converter = new showdown.Converter({simplifiedAutoLink: true, strikethrough: true});
|
|
|
|
} else if (suite[i].name === 'disallow-underscores') {
|
|
|
|
converter = new showdown.Converter({literalMidWordUnderscores: true, simplifiedAutoLink: true});
|
2017-04-05 23:25:20 +08:00
|
|
|
} else if (suite[i].name === 'disallow-asterisks') {
|
|
|
|
converter = new showdown.Converter({literalMidWordAsterisks: true, simplifiedAutoLink: true});
|
2017-02-27 03:13:52 +08:00
|
|
|
} else {
|
|
|
|
converter = new showdown.Converter({simplifiedAutoLink: true});
|
|
|
|
}
|
|
|
|
it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter));
|
2015-07-11 23:44:24 +08:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2017-10-24 23:46:40 +08:00
|
|
|
/** test openLinksInNewWindow support **/
|
2017-03-31 07:25:40 +08:00
|
|
|
describe('openLinksInNewWindow support in', function () {
|
|
|
|
var converter,
|
|
|
|
suite = openLinksInNewWindowSuite;
|
|
|
|
for (var i = 0; i < suite.length; ++i) {
|
|
|
|
if (suite[i].name === 'simplifiedAutoLink') {
|
|
|
|
converter = new showdown.Converter({openLinksInNewWindow: true, simplifiedAutoLink: true});
|
|
|
|
} else {
|
|
|
|
converter = new showdown.Converter({openLinksInNewWindow: true});
|
|
|
|
}
|
|
|
|
it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter));
|
|
|
|
}
|
|
|
|
});
|
2017-04-23 09:04:13 +08:00
|
|
|
|
2017-10-24 23:46:40 +08:00
|
|
|
/** test disableForced4SpacesIndentedSublists support **/
|
2017-04-23 09:04:13 +08:00
|
|
|
describe('disableForced4SpacesIndentedSublists support in', function () {
|
|
|
|
var converter,
|
|
|
|
suite = disableForced4SpacesIndentedSublistsSuite;
|
|
|
|
for (var i = 0; i < suite.length; ++i) {
|
|
|
|
converter = new showdown.Converter({disableForced4SpacesIndentedSublists: true});
|
|
|
|
it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter));
|
|
|
|
}
|
|
|
|
});
|
2017-08-07 00:45:04 +08:00
|
|
|
|
2017-10-24 23:46:40 +08:00
|
|
|
/** test rawHeaderId support **/
|
2017-08-07 00:45:04 +08:00
|
|
|
describe('rawHeaderId support', function () {
|
|
|
|
var converter,
|
2017-08-07 01:19:46 +08:00
|
|
|
suite = rawHeaderIdSuite;
|
2017-08-07 00:45:04 +08:00
|
|
|
for (var i = 0; i < suite.length; ++i) {
|
|
|
|
if (suite[i].name === 'with-prefixHeaderId') {
|
|
|
|
converter = new showdown.Converter({rawHeaderId: true, prefixHeaderId: '/prefix/'});
|
|
|
|
} else {
|
|
|
|
converter = new showdown.Converter({rawHeaderId: true});
|
|
|
|
}
|
|
|
|
it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter));
|
|
|
|
}
|
|
|
|
});
|
2017-08-07 01:19:46 +08:00
|
|
|
|
2017-10-24 23:46:40 +08:00
|
|
|
/** test rawPrefixHeaderId support **/
|
2017-08-07 01:19:46 +08:00
|
|
|
describe('rawPrefixHeaderId support', function () {
|
|
|
|
var converter,
|
|
|
|
suite = rawPrefixHeaderIdSuite;
|
|
|
|
for (var i = 0; i < suite.length; ++i) {
|
|
|
|
converter = new showdown.Converter({rawPrefixHeaderId: true, prefixHeaderId: '/prefix/'});
|
|
|
|
it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter));
|
|
|
|
}
|
|
|
|
});
|
2017-10-24 20:44:49 +08:00
|
|
|
|
2017-10-24 23:46:40 +08:00
|
|
|
/** test emojis support **/
|
2017-10-24 20:44:49 +08:00
|
|
|
describe('emojis support', function () {
|
|
|
|
var converter,
|
2021-11-15 04:17:19 +08:00
|
|
|
suite = emojisSuite,
|
|
|
|
imgSrcRegexp = /<img[^>]+src=("https?:\/\/[^"]+"|'https?:\/\/[^']+')/g;
|
|
|
|
|
|
|
|
function testImageUrlExists (imgUrl) {
|
|
|
|
// Strip the quotes
|
|
|
|
imgUrl = imgUrl.substr(0, imgUrl.length - 1).substr(1);
|
|
|
|
return function (done) {
|
|
|
|
(imgUrl.startsWith('http://') ? http : https).get(imgUrl, function (res) {
|
|
|
|
expect(res.statusCode).to.equal(200);
|
|
|
|
// Make sure we get some data and that it's a png
|
|
|
|
expect(parseInt(res.headers['content-length'], 10)).to.be.above(0);
|
|
|
|
expect(res.headers['content-type']).to.equal('image/png');
|
|
|
|
|
|
|
|
// Discard the data (but fetch it)
|
|
|
|
res.on('data', function () {});
|
|
|
|
|
|
|
|
res.on('end', function () {
|
|
|
|
done();
|
|
|
|
});
|
|
|
|
}).on('error', function (e) {
|
|
|
|
throw e;
|
|
|
|
});
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2017-10-24 20:44:49 +08:00
|
|
|
for (var i = 0; i < suite.length; ++i) {
|
|
|
|
if (suite[i].name === 'simplifiedautolinks') {
|
|
|
|
converter = new showdown.Converter({emoji: true, simplifiedAutoLink: true});
|
|
|
|
} else {
|
|
|
|
converter = new showdown.Converter({emoji: true});
|
|
|
|
}
|
|
|
|
|
|
|
|
it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter));
|
2021-11-15 04:17:19 +08:00
|
|
|
|
|
|
|
var imgUrl = imgSrcRegexp.exec(suite[i].expected);
|
|
|
|
if (imgUrl) {
|
|
|
|
it('should use a working emoji URL', testImageUrlExists(imgUrl[1]));
|
|
|
|
}
|
2017-10-24 20:44:49 +08:00
|
|
|
}
|
|
|
|
});
|
2017-10-24 23:46:40 +08:00
|
|
|
|
2017-11-17 02:34:02 +08:00
|
|
|
/** test underline support **/
|
|
|
|
describe('underline support', function () {
|
2017-10-24 23:46:40 +08:00
|
|
|
var converter,
|
|
|
|
suite = underlineSuite;
|
|
|
|
for (var i = 0; i < suite.length; ++i) {
|
|
|
|
if (suite[i].name === 'simplifiedautolinks') {
|
|
|
|
converter = new showdown.Converter({underline: true, simplifiedAutoLink: true});
|
|
|
|
} else {
|
|
|
|
converter = new showdown.Converter({underline: true});
|
|
|
|
}
|
|
|
|
it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter));
|
|
|
|
}
|
|
|
|
});
|
2017-11-17 02:34:02 +08:00
|
|
|
|
2019-10-04 22:45:27 +08:00
|
|
|
/** test ellipsis option **/
|
|
|
|
describe('ellipsis option', function () {
|
|
|
|
var converter,
|
|
|
|
suite = ellipsisSuite;
|
|
|
|
for (var i = 0; i < suite.length; ++i) {
|
|
|
|
converter = new showdown.Converter({ellipsis: false});
|
|
|
|
it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter));
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2017-11-17 23:23:23 +08:00
|
|
|
/** test literalMidWordUnderscores option **/
|
|
|
|
describe('literalMidWordUnderscores option', function () {
|
|
|
|
var converter,
|
|
|
|
suite = literalMidWordUnderscoresSuite;
|
|
|
|
for (var i = 0; i < suite.length; ++i) {
|
|
|
|
converter = new showdown.Converter({literalMidWordUnderscores: true});
|
|
|
|
it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter));
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2017-11-17 02:34:02 +08:00
|
|
|
/** test literalMidWordAsterisks option **/
|
2018-09-15 05:46:03 +08:00
|
|
|
/*
|
2017-11-17 02:34:02 +08:00
|
|
|
describe('literalMidWordAsterisks option', function () {
|
|
|
|
var converter,
|
|
|
|
suite = literalMidWordAsterisksSuite;
|
|
|
|
for (var i = 0; i < suite.length; ++i) {
|
|
|
|
converter = new showdown.Converter({literalMidWordAsterisks: true});
|
|
|
|
it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter));
|
|
|
|
}
|
|
|
|
});
|
2018-09-15 05:46:03 +08:00
|
|
|
*/
|
2017-12-10 15:15:09 +08:00
|
|
|
|
|
|
|
/** test completeHTMLDocument option **/
|
|
|
|
describe('completeHTMLDocument option', function () {
|
2017-12-10 12:49:24 +08:00
|
|
|
var converter,
|
|
|
|
suite = completeHTMLOutputSuite;
|
|
|
|
for (var i = 0; i < suite.length; ++i) {
|
2017-12-10 15:15:09 +08:00
|
|
|
converter = new showdown.Converter({completeHTMLDocument: true});
|
|
|
|
|
|
|
|
it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter));
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
/** test metadata option **/
|
|
|
|
describe('metadata option', function () {
|
|
|
|
var converter,
|
|
|
|
suite = metadataSuite;
|
|
|
|
|
|
|
|
for (var i = 0; i < suite.length; ++i) {
|
|
|
|
if (suite[i].name === 'embeded-in-output' ||
|
|
|
|
suite[i].name === 'embeded-two-consecutive-metadata-blocks' ||
|
|
|
|
suite[i].name === 'embeded-two-consecutive-metadata-blocks-different-symbols') {
|
|
|
|
converter = new showdown.Converter({metadata: true, completeHTMLDocument: true});
|
|
|
|
} else if (suite[i].name === 'ignore-metadata') {
|
|
|
|
converter = new showdown.Converter({metadata: false});
|
|
|
|
} else {
|
|
|
|
converter = new showdown.Converter({metadata: true});
|
|
|
|
}
|
2017-12-10 12:49:24 +08:00
|
|
|
it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter));
|
|
|
|
}
|
|
|
|
});
|
2017-12-22 17:54:23 +08:00
|
|
|
|
|
|
|
/** test metadata option **/
|
|
|
|
describe('splitAdjacentBlockquotes option', function () {
|
|
|
|
var converter,
|
|
|
|
suite = splitAdjacentBlockquotesSuite;
|
|
|
|
|
|
|
|
for (var i = 0; i < suite.length; ++i) {
|
|
|
|
converter = new showdown.Converter({splitAdjacentBlockquotes: true});
|
|
|
|
it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter));
|
|
|
|
}
|
|
|
|
});
|
2022-02-24 09:57:08 +08:00
|
|
|
|
|
|
|
/** test moreStyling option **/
|
|
|
|
describe('moreStyling option', function () {
|
|
|
|
var converter,
|
|
|
|
suite = moreStyling;
|
|
|
|
|
|
|
|
for (var i = 0; i < suite.length; ++i) {
|
|
|
|
converter = new showdown.Converter({moreStyling: true, tasklists: true});
|
|
|
|
it(suite[i].name.replace(/-/g, ' '), assertion(suite[i], converter));
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2015-06-17 08:22:05 +08:00
|
|
|
});
|