mirror of
https://github.com/10h30/wordpress-export-to-markdown.git
synced 2026-06-05 15:09:59 +09:00
Change code block style
This commit is contained in:
@@ -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';
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user