| When a page is rendered to plain/1.0, the text that an info, warning, error or success macro generates before its content (the alternative text of its icon, and its title when one is set) is printed right after the last character of the previous block, with no separator. Steps to reproduce
- On a standard XWiki, open the Sandbox home page with the plain output syntax: /xwiki/bin/get/Sandbox/WebHome?outputSyntax=plain
- Look at the text around the two info boxes and the warning box.
Expected The label and the title of a box start on their own line, as the box content does. Actual
Cause PlainTextChainingRenderer prints an empty line only at the beginning of a paragraph, header, list, table, horizontal line, quotation or definition list. It has no handler for the beginning of a group or of a format block, so inline content placed directly in a group is appended to what was printed before. The message macros produce such content: the box group starts with a format block holding the alternative text of the icon, followed by a group holding the title, and only then the content paragraphs. For the same reason a page that starts with a message box gets the label glued to the first words of the box content. Any plain text produced from an executed XDOM is affected, for example the plain text part of notification mails. |