## page was renamed from MoinMoinBugs/MoinMoinBugs/GuiEditorShiftEnterBreaksTables = GUI-Editor Shift+Enter breaks tables = ## Please read this page. Lines prefixed with ## such as this one are comments, ## you can remove them (except for those after the "Plan" section.) ## Please follow the instructions given in those comments and the text. ## After creating the bug page, please subscribe to it! We may have questions ## that only you can answer, and if you get email when your bug changes it'll ## be much faster to get it fixed since you can answer the questions! Pressing {{{Shift+Enter}}} Inside GUI editor inserts a new-line char, which may cause the table to be broken. == Steps to reproduce == ## Describe the steps needed to reproduce the bug. If we can't reproduce it, we probably can't fix it. 1. Edit a page in GUI Mode. 1. Inside a cell, type {{{aaaaaaaaa}}} 1. Press save. The table isn't rendered properly because that moin wiki code is broken. see below. == Example == ||'''Content typed:'''||'''Sample result'''|| ||aaaaaaaaa||aaa aaa aaa || ||aaaaaaaaa||aaa aaa aaa || ||aaaaaaaaa||aaa<
>aaa<
>aaa|| == Component selection == ## Where you think is this bug happening ? (general, plugin [plugin name], theme [theme name], ... * MoinMoin/converter/text_html_text_moin_wiki.py == Details == ## If you got a traceback, please save the traceback page as html and attach here: ## [[attachment:traceback.html]] ## if the bug is in this wiki, just kill the table and write: This Wiki. ## If a traceback is not available, please fill in the details here: ||'''!MoinMoin Version''' ||1.8.2 || ||'''OS and Version''' ||Debian Sid || ||'''Python Version''' ||2.5 || ||'''Server Setup''' ||Apache/CGI || ||'''Server Details''' || || ||'''Language you are using the wiki in''' (set in the browser/UserPreferences) ||English || == Workaround == ## How to deal with the bug until it is fixed Fix the code manually (in raw text mode), by removing the line feed. = Discussion = Here's a patch: {{{guieditor_preserve_br.diff}}}, which also works in conjunction with MoinMoinBugs/GuiEditorDontAllowBrInTables {{{#!diff --- a/MoinMoin/converter/text_html_text_moin_wiki.py 2009-03-01 21:08:05.000000000 +0100 +++ b/MoinMoin/converter/text_html_text_moin_wiki.py 2009-03-01 21:08:08.000000000 +0100 @@ -568,8 +568,10 @@ # self.text.append("\n") def process_br(self, node): - self.text.append(self.new_line) # without this, std multi-line text below some heading misses a whitespace - # when it gets merged to float text, like word word wordword word word + self.text.append('<
>') # without this, std multi-line text below some heading misses a whitespace + # when it gets merged to float text, like word word wordword word word + # note: Do not print a new-line, since it would break moinmoin tables. + # regression test: type "aaaaaaaaa" def process_heading(self, node): text = self.node_list_text_only(node.childNodes).strip() }}} = Plan = ## This part is for Moin``Moin developers: * Priority: * Assigned to: * Status: Patch (review and test is welcome). ---- ## If you are a moin core developer, replace the category to Category* in these cases: ## Category MoinMoinNoBug - if this is not a bug. ## Category MoinMoinBugConfirmed - if you can confirm the bug on current code. ## Category MoinMoinBugFixed - after the bug is fixed in current code. CategoryMoinMoinBug