Thanks Vincent,
IMO it might be a lot simpler to just support XWiki
Syntax 2.1. And you'll get additional features too.
Of course, but for this
specific use-case I don't want the additional
features :)
For example if someone writes "{{code}}" in a mail, I don't want it to
be interpreted when displaying the mail.
Maybe what could do the trick would be to support 2.1 as you say, and
just escape what I don't want to be interpreted, ie replace "{{" by
"~{~{", "**" by "~*~*", "[[" by "~[~["
and so on.
Thanks,
Jeremie
2012/5/29 Vincent Massol <vincent(a)massol.net>et>:
> Hi Jeremie,
>
> On May 27, 2012, at 11:52 AM, Jeremie BOUSQUET wrote:
>
>> Hello,
>>
>> For the mail archiver app, I need to output mail content in a page. I
>> used to use it with html content, and display is directly done with
>> {{html}} macro.
>>
>> But most messages from mailing-lists are plain-text. My first idea was
>> to use {{code}}, and this is fine.
>> But I think display could be greatly improved using specific xwiki
>> syntax rendering (2.1), but for some elements only.
>>
>> To do so, I would like to render some text string, not applying all
>> syntax elements.
>>
>> Let me explain : what is interesting to render is :
>> - quotes (lines starting with angle brackets '>'),
>> - urls (replaced by links automatically),
>> - emoticons
>>
>> Everything else (wiki macros, ...) should NOT be rendered.
>>
>> Is this possible ?
>> Of course I don't want to impact the way xwiki renders pages.
>
> Short answer: no
>
> We have parsers for different syntaxes so you need to pick a syntax fully.
> The only thing that can be set on or off are the transformations (i.e. macro
executions and emoticons) since those are executed on the XDOM.
>
> Longer answer: you'd need to define your syntax and write a parser for it.
Depending on your syntax it can be easy or hard. Emoticons are already supported so you
won't need to add support for this. All you'll need from your example are
recognizing quotes and urls.
>
IMO it might be a lot simpler to just support XWiki
Syntax 2.1. And you'll get additional features too.
>
> Hope it helps,
> -Vincent
>
>
>
>
>
> _______________________________________________
> users mailing list
> users(a)xwiki.org
>
http://lists.xwiki.org/mailman/listinfo/users