mirror of
https://github.com/10h30/wordpress-export-to-markdown.git
synced 2026-06-05 15:09:59 +09:00
Merge pull request #156 from lonekorean/lost-links
comment out problematic rule for now
This commit is contained in:
+6
-6
@@ -37,12 +37,12 @@ function initTurndownService() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// <div> within <a> can cause extra whitespace that wreck markdown links, so this removes them
|
// <div> within <a> can cause extra whitespace that wreck markdown links, so this removes them
|
||||||
turndownService.addRule('a', {
|
// turndownService.addRule('a', {
|
||||||
filter: 'a',
|
// filter: 'a',
|
||||||
replacement: (content) => {
|
// replacement: (content) => {
|
||||||
return content.replace(/<\/?div[^>]*>/gi, '');
|
// return content.replace(/<\/?div[^>]*>/gi, '');
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
// preserve embedded scripts (for tweets, codepens, gists, etc.)
|
// preserve embedded scripts (for tweets, codepens, gists, etc.)
|
||||||
turndownService.addRule('script', {
|
turndownService.addRule('script', {
|
||||||
|
|||||||
Reference in New Issue
Block a user