Changing fencing on html blocks

Because *someone* had to use three pipes in their twitter display name
This commit is contained in:
Jocelyn Badgley (Twipped)
2020-03-06 19:30:48 -08:00
parent 6ae8f358a4
commit b9f82a7018
3 changed files with 8 additions and 7 deletions

View File

@@ -31,7 +31,7 @@ const markdownEngines = {
permalinkSymbol: '<img src="/images/svg/paragraph.svg">',
slugify,
})
.use(require('./lib/markdown-raw-html')),
.use(require('./lib/markdown-raw-html'), { debug: false }),
preview: markdownIt({
html: false,
@@ -45,7 +45,7 @@ function markdown (mode, input, env) {
input = input.replace(/\{!\{([\s\S]*?)\}!\}/mg, (match, contents) => {
try {
const result = handlebars.compile(contents)(env);
return '|||' + result + '|||';
return 'æææ' + result + 'æææ';
} catch (e) {
log.error(e);
return '';
@@ -55,7 +55,7 @@ function markdown (mode, input, env) {
if (mode === 'preview') {
input = striptags(input
.replace(/<!--\[[\s\S]*?\]-->/g, '')
.replace(/|||[\s\S]*?|||/gi, ''),
.replace(/æææ[\s\S]*?æææ/gi, ''),
).trim();
if (input.length > 1000) input = input.slice(0, 1000) + '…';
input = input ? markdownEngines[mode].render(input) : '';