Vincent Massol wrote:
Hi,
I think I've finished enough in the new rendering implementation so
that we should now start defining formally the new XWiki 2.0 syntax.
However before we do that let me highlight one important limitation
due to the underlying frameworks we use (wikimodel in this case):
Wikimodel is using a JavaCC grammar and thus is not able to do look
ahead and backtracking (ANTLR can do it, but even if JavaCC could do
it it would still be too expensive to use). This means that wikimodel
is not able to support the following example:
This is a * that is not a bold.
When wikimodel sees one of XWiki's special char (like the star for
bold) it'll put everything that comes after as bold, till it find
another star or till the end of the document.
Even if there's no backtracking, there's lookahead. See
https://javacc.dev.java.net/doc/lookahead.html
There are 2 solutions out of this:
* We don't allow users to enter non-escaped star for example.
* Or better we change our syntax for bold so that it uses a 2 chars.
For example **. It's less likely people will use 2 stars in their
content and this is the reason most wikis use 2 chars. This is also
consistent with our other syntaxes for underline, strikethrough,
italics, etc. Note that this is also inline with the creole syntax:
http://www.wikicreole.org/
The same problem exists for links. We're currently using single
brackets which means people cannot use brackets in their text. I'd
also propose to use double brackets for links as in: [[This is a
link]]. Again this is consistent with the rest.
There are several other topics to address but let's start with Bold
and Link syntaxes right now. Once we agree on them, I'll do the
following:
* Create a XWiki 2.0 syntax page on
xwiki.org and put Bold and Linkj
syntax there
* Send change requests to wikimodel for the changes we decide
* Adapt the new rendering module code
* Send other emails for remaining syntax elements
To summarize the vote here is about:
* Using ** for bold in the new XWiki 2.0 syntax
* Using [[ for links in the new XWiki 2.0 syntax
+1 for these, not because there's a technical need, but to be consistent with other
wiki syntaxes.
Hopefully we'll have a nice editor so that existing users will not have to notice the
new syntax,
but use a visual tool.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/