瀏覽代碼

Skip junk html tags when converting to mkdown

shortcutme 7 年之前
父節點
當前提交
df9dd78746
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      alloy-editor/to-markdown.js

+ 6 - 0
alloy-editor/to-markdown.js

@@ -252,6 +252,12 @@ module.exports = [
       return '\n'
     }
   },
+  {
+    filter: ["main", "article", "section", "figure", "footer", "header", "body", "figcaption"],
+    replacement: function (content) {
+      return content
+    }
+  },
   {
     filter: ['del', 's', 'strike'],
     replacement: function (content) {