1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-27 08:21:03 +02:00

All: Fixed Markdown rendering when code highlighting is disabled

This commit is contained in:
Laurent Cozic 2020-11-23 16:26:34 +00:00
parent 1dd6c7dde5
commit 62c67cb09f

View File

@ -409,10 +409,16 @@ export default class MdToHtml {
outputCodeHtml = markdownIt.utils.escapeHtml(trimmedStr);
}
return {
wrapCode: false,
html: `<div class="joplin-editable">${sourceBlockHtml}<pre class="hljs"><code>${outputCodeHtml}</code></pre></div>`,
};
const html = `<div class="joplin-editable">${sourceBlockHtml}<pre class="hljs"><code>${outputCodeHtml}</code></pre></div>`;
if (rules.fence) {
return {
wrapCode: false,
html: html,
};
} else {
return html;
}
},
});