codespans partial compliance

Closes #669
This commit is contained in:
Estevão Soares dos Santos 2022-05-09 04:11:59 +01:00
parent cd293fb61a
commit 75b7707460
3 changed files with 2 additions and 4 deletions

View File

@ -293,7 +293,7 @@ showdown.Converter = function (converterOptions) {
text = text.replace(/\r/g, '\n'); // Mac to Unix
// Stardardize line spaces
text = text.replace(/\u00A0/g, ' ');
//text = text.replace(/\u00A0/g, ' ');
if (options.smartIndentationFix) {
text = rTrimInputText(text);

View File

@ -56,7 +56,7 @@ showdown.subParser('makehtml.codeSpan', function (text, options, globals) {
c = c.replace(/^([ \t]*)/g, ''); // leading whitespace
c = c.replace(/[ \t]*$/g, ''); // trailing whitespace
// remove newlines
c = c.replace(/\n/, ' ');
c = c.replace(/\n/g, ' ');
let captureStartEvent = new showdown.Event('makehtml.codeSpan.onCapture', c);
captureStartEvent

View File

@ -42,8 +42,6 @@ describe('makeHtml() commonmark testsuite', function () {
testsuite[section][i].expected = testsuite[section][i].expected.replace('language-;', '; language-;');
break;
case 'Hard line breaks_638':
console.log(testsuite[section][i].input);
}
it(name, assertion(testsuite[section][i], converter, true));