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

Unexpected empty line at the start of the macro content

    Details

    • Tests:
      Integration
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      The following HTML (produced by the WYSIWYG editor):

      <!--startmacro:box|-||-|foo-->
      <div data-xwiki-non-generated-content="java.util.List<org.xwiki.rendering.block.Block>" class="xwiki-metadata-container"><p>foo</p></div>
      <!--stopmacro-->
      <div class="wikimodel-emptyline"></div>
      <!--startmacro:box|-||-|bar-->
      <div data-xwiki-non-generated-content="java.util.List<org.xwiki.rendering.block.Block>" class="xwiki-metadata-container"><p>bar</p></div>
      <!--stopmacro-->
      

      is converted to the following XWii 2.1 syntax:

      {{box}}
      foo
      {{/box}}
      
      {{box}}
      
      bar
      {{/box}}
      

      As you can see there is an unexpected empty line at the start of the second macro. If I replace the wikimodel-emptyline DIV with a paragraph of text then the result of the conversion is as expected. The following:

      <!--startmacro:box|-||-|foo-->
      <div data-xwiki-non-generated-content="java.util.List<org.xwiki.rendering.block.Block>" class="xwiki-metadata-container"><p>foo</p></div>
      <!--stopmacro-->
      <p>toto</p>
      <!--startmacro:box|-||-|bar-->
      <div data-xwiki-non-generated-content="java.util.List<org.xwiki.rendering.block.Block>" class="xwiki-metadata-container"><p>bar</p></div>
      <!--stopmacro-->
      

      leads to:

      {{box}}
      foo
      {{/box}}
      
      toto
      
      {{box}}
      bar
      {{/box}}
      

      I assume the empty line between the macros is causing the problem. It doesn't reproduce if I use a single macro, with an empty line before.

      It could be related to XRENDERING-177.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                surli Simon Urli
                Reporter:
                mflorea Marius Dumitru Florea
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: