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

Impossible to use Macros with content when using the MediaWiki syntax

    XMLWordPrintable

Details

    Description

      The reason is that in org.xwiki.rendering.wikimodel.mediawiki.MediaWikiMacroParser there's:

      public WikiMacro parse(String str)
      {
        String name = null;
        String definition = str;
      ...
        return new WikiMacro(name, params, definition);
      }
      

      However the 3rd param of WikiMacro is supposed to be the content. The problem is that here it's being passed the full string. For example if you have:

      {{macro|param=1}}
      

      then content will be

      {{macro|param=1}}
      

      I think we could either decide that there's a special parameter for content such as "content" or if the parameter is unnamed and the last one then use that as the content.

      Attachments

        Activity

          People

            tmortagne Thomas Mortagne
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: