Ver Fonte

Preserved newlines in exported Markdown

Ryan Atkinson há 4 anos atrás
pai
commit
c9c70a3b8f
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      _layouts/rule.html

+ 2 - 2
_layouts/rule.html

@@ -210,9 +210,9 @@ https://github.com/Bernardo-Castilho/dragdroptouch -->
   
   // end RuleBuilder functions
 
-  // Removes all HTML content
+  // Removes all HTML content, replacing line break tags with newlines
   function stripHTML(input) {
-      input = input.replace(/(<([^>]+)>)/ig,'');
+      input = input.replace(/<br ?\/?>/ig, "\n").replace(/(<([^>]+)>)/ig,'');
       return input;
   }