Explorar el Código

Skip junk html tags when converting to mkdown

shortcutme hace 7 años
padre
commit
df9dd78746
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  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) {