Change code block style

This commit is contained in:
Will Boyd
2018-11-06 16:41:00 -05:00
parent 3090712454
commit c0788e61ce
+3 -2
View File
@@ -139,14 +139,15 @@ function collectPosts(data) {
function initTurndownService() {
let turndownService = new turndown({
headingStyle: 'atx',
bulletListMarker: '-'
bulletListMarker: '-',
codeBlockStyle: 'fenced'
});
// preserve embedded scripts (for gists, codepens, etc.)
turndownService.addRule('script', {
filter: 'script',
replacement: (content, node) => {
let html = node.outerHTML.replace('async=""', 'async')
let html = node.outerHTML.replace('async=""', 'async');
return '\n\n' + html + '\n\n';
}
});