Uploaded image for project: 'XWiki Rendering'
  1. XWiki Rendering
  2. XRENDERING-832

The plain/1.0 renderer glues the label and title of a message box to the text before it

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 17.4.0
    • Syntax - plain/1.0
    • None
    • Unknown

    Description

      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

      1. On a standard XWiki, open the Sandbox home page with the plain output syntax: /xwiki/bin/get/Sandbox/WebHome?outputSyntax=plain
      2. 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

      Simply click on Edit to get started!Information
      
      Don't worry about overwriting or losing stuff when editing the page, ...
      
      Level 6 Heading 6InformationAccessibility recommendation
      
      In order to provide the best experience for assistive technology users ...
      
      This macro allows you to draw users' attention to a specific piece of information:Warning
      
      Hello World
      

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ppantiru Paul Pantiru
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: