From 815408a26f114baf1ce20b2a427573a8ff1eff86 Mon Sep 17 00:00:00 2001
From: echicken <>
Date: Fri, 28 Sep 2018 02:10:22 +0000
Subject: [PATCH] Linebreak \\

---
 exec/load/markdown.js | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/exec/load/markdown.js b/exec/load/markdown.js
index 37034e37e5..e889c477f8 100644
--- a/exec/load/markdown.js
+++ b/exec/load/markdown.js
@@ -1,18 +1,26 @@
 /*
  * Partial DokuWiki markup parser/renderer
  * == h5 ==
+ * === h4 ===
  * ==== h3 ====
+ * ===== h2 =====
  * ====== h1 ======
  * [[http://some.web.site/|some link text]]
  * {{http://some.web.site/image.png|some alt text}}
  * ** bold **
  * // italic //
  * __ underline __
+ * '' monospaced ''
+ * ** // __ '' bold italic underline monospace '' __ // **
  * > blockquote
  * * Unordered lists
  *  * With sub-items
  * - Ordered lists
  *  - With sub-items
+ * Lines\\ with\\ forced\\ line\\ breaks
+ * ^this^is^a^table^heading^
+ * |this|is|a|table|row|
+ * ^you|can|have|headings|anywhere|
  * To do:
  *  - nested blockquote in HTML
  *  - image links
@@ -161,7 +169,7 @@ Markdown.prototype.render_text_console = function (text) {
   }).replace(/\(\(([^\)]+)\)\)/g, function (m, c) {
     self.state.footnotes.push(c);
     return '\1+' + self.config.console.footnote_style + '[' + self.state.footnotes.length + ']\1-';
-  });
+  }).replace(/\\\\(\s|$)/g, '\r\n');
 }
 
 Markdown.prototype.render_text_html = function (text) {
@@ -185,7 +193,7 @@ Markdown.prototype.render_text_html = function (text) {
   }).replace(/\(\(([^\)]+)\)\)/g, function (m, c) {
     self.state.footnotes.push(c);
     return self.html_tag_format('a', { href : '#f' + self.state.footnotes.length }) + ' [' + self.state.footnotes.length + ']</a>';
-  });
+  }).replace(/\\\\(\s|$)/g, '<br>');
 }
 
 Markdown.prototype.render_table = function () {
-- 
GitLab