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

New lines added when parsing and re-rendering groups in xwiki/2.1

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 13.10.5
    • Syntax - xwiki/2.1
    • None
    • Unknown

    Description

      Steps to reproduce :

      Create a new page (eg Sandbox.TestPage.WebHome with the following content :

      (((
      
      
      )))
      

      In a second page, put the following script :

      {{velocity}}
      #set($xdom = $xwiki.getDocument('Sandbox.TestPage.WebHome').getXDOM())
      #set($rendered = $services.rendering.render($xdom, 'xwiki/2.1'))
      {{code language="none"}}
      $rendered
      {{/code}}
      {{/velocity}}
      

      Expected : the code macro resulting of the script execution should contain the same content as the content of Sandbox.TestPage.WebHome.

      Actual : the code macro contains an extra blank line in between the group parenthesis, as such :

      (((
      
      
      
      )))
      

      To quote tmortagne :

      problem is that the last NL (new line) is not "consumed" by the parser as the renderer seems to expect

      Attachments

        Issue Links

          Activity

            People

              MichaelHamann Michael Hamann
              caubin Clément Aubin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: