On Aug 28, 2009, at 6:35 PM, Guillaume Lerouge wrote:
Hi,
On Fri, Aug 28, 2009 at 6:17 PM, Vincent Massol <vincent(a)massol.net>
wrote:
Hi,
Right now we support code macro in both inline and standalone modes.
However the style isn't nice if the macro is inline and on several
lines.
For ex:
This is {{code language="java"}}
public class LoggingEventListener implements EventListener
{
}
{{/code}} inline
I'm proposing to test in the code macro if there are NL in the macro
content and if so and if the macro is inline then generate an error
explaining that the macro but not be inline to use multi line
content.
WDYT?
What about automatically displaying it as if it were standalone if
there are
new lines in it instead of generating an error?
Because it's an error...
It's not standalone... It's not right for a macro such as this one to
start modifying the XDOM content.
Ex:
This is {{sommacro/}} something
generates:
- begin para
- onword
- onspace
- onword
- onspace
- (result of macro inserted here)
- onspace
- onword
Renderers don't know anything about the macro and putting non inline
block in a paragraph block is invalid.
Thanks
-Vincent