[xwiki-users] update from 1.8.2 to 1.8.3 - velocity macro renders differently
Hello, I just updated XWiki (by fresh install) from 1.8.2 to 1.8.3 and following velocity code renders differently: {{velocity}} #foreach( $attachment in $doc.getAttachmentList() ) * [[$attachment.getFilename()>>attach:$attachment.getFilename()]] : {{code language=clojure}} $attachment.getContentAsString() {{/code}} #end {{/velocity}} The intention of the macro is to render all attachments as code. In 1.8.2, I get one box per code attachment as expected, in 1.8.3 it looks that it renders each line of the attachment (one box per line of the code). Any ideas how I can fix this? Kind regards, Vlad
The {{code}} macro has to have an empty line beforehand - this way it renders everything enclosed in one box... Vlad
On Thu, May 14, 2009 at 20:49, Vladimir Konrad <[email protected]> wrote:
The {{code}} macro has to have an empty line beforehand - this way it renders everything enclosed in one box...
Vlad _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
The difference is that in 1.8.2 there was a bug in macro parsing which did not matched correctly inline macros based on the general xwiki parser rule, this is fixed now, meaning that: ---------------------------------- {{macro/}} some text ---------------------------------- {{macro/}} some text ---------------------------------- {{macro/}} {{macro/}} ---------------------------------- {{macro/}} {{macro/}} ---------------------------------- are now inline macros. To break a paragraph you need an empty line, as you seen you need: ---------------------------------- {{macro/}} {{macro/}} ---------------------------------- What append in your case is that all your codes macro was matched as inline and got rendered as a list a followed <span class="code"> which looks like one big box even it's not really one. -- Thomas Mortagne
Hello Thomas,
The difference is that in 1.8.2 there was a bug in macro parsing which did not matched correctly inline macros based on the general xwiki parser rule... (snipped)
What append in your case is that all your codes macro was matched as inline and got rendered as a list a followed <span class="code"> which looks like one big box even it's not really one.
Thank you for detailed explanation, it makes sense (the code macro renders differently depending on the enclosing context). Kind regards, Vlad
participants (2)
-
Thomas Mortagne -
Vladimir Konrad