From 2e7f981821cf2fd679aa6e2a0998c4ecf9829c33 Mon Sep 17 00:00:00 2001 From: AlexBlack788 <60142358+AlexBlack788@users.noreply.github.com> Date: Wed, 4 Mar 2020 17:12:08 +0300 Subject: [PATCH] wrap bug fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, if you create a ListItem in the built-in DokuWik editor that contains the following code:    - listitem with wrap | Test1 | Test2 | | Result1 | Result2 | And then switch to Prosemirror editor and back to DokuWiki editor, this code will be corrupted. This fix prevents code corruption. --- parser/ParagraphNode.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/parser/ParagraphNode.php b/parser/ParagraphNode.php index c524f0aa..a6f4ae2b 100644 --- a/parser/ParagraphNode.php +++ b/parser/ParagraphNode.php @@ -29,7 +29,8 @@ public function toSyntax() { $doc = ''; foreach ($this->subnodes as $subnode) { - $doc .= $subnode->toSyntax(); + if (is_a($subnode, TableNode::class)) $doc .= "\n"; + $doc .= $subnode->toSyntax(); } return $doc; }