[xwiki-devs] Odd thing in the xwiki grammar
Hello, I'm looking at the grammar file for XWiki 2.0 syntax in wikimodel and noticed that syntax on the following form is explicitly allowed: [[link containing [[image:image references]] in the text]] From the javacc-file: | <#REFERENCE_IMAGE: "[[image:" ("~" ~[] | ~["]"] | "]" ~["]"] )* "]]" > | <#REFERENCE: ( "[[" ( <REFERENCE_IMAGE> | "~" ~[] | ~["]"] | "]" ~["]"] )* "]]" ) > ^^^^^^^^^^^^^^^ Why is this here? I'm guessing that this is a mistake, or am I missing something? Best regards, /Andreas Jonsson
Hi Andreas, On Jan 11, 2010, at 8:38 PM, Andreas Jonsson wrote:
Hello,
I'm looking at the grammar file for XWiki 2.0 syntax in wikimodel and noticed that syntax on the following form is explicitly allowed:
[[link containing [[image:image references]] in the text]]
From the javacc-file:
| <#REFERENCE_IMAGE: "[[image:" ("~" ~[] | ~["]"] | "]" ~["]"] )* "]]" > | <#REFERENCE: ( "[[" ( <REFERENCE_IMAGE> | "~" ~[] | ~["]"] | "]" ~["]"] )* "]]" ) > ^^^^^^^^^^^^^^^ Why is this here?
I'm guessing that this is a mistake, or am I missing something?
We allow wiki syntax inside link labels. Thus you're allowed to create a link on an image. In term of HTML this means something like: <a href="...."><img src="...."/></a> Thanks -Vincent
Vincent Massol wrote:
We allow wiki syntax inside link labels. Thus you're allowed to create a link on an image. In term of HTML this means something like: <a href="...."><img src="...."/></a>
I see, that makes perfect sense. Thanks! The reason I was studying the grammar is that I am considering a solution to this issue: http://code.google.com/p/wikimodel/issues/detail?id=87 I have posted a comment over there. Please, have a look at it. Best regards, Andreas Jonsson
Hi, On Mon, Jan 11, 2010 at 22:38, Andreas Jonsson <[email protected]> wrote:
Vincent Massol wrote:
We allow wiki syntax inside link labels. Thus you're allowed to create a link on an image. In term of HTML this means something like: <a href="...."><img src="...."/></a>
I see, that makes perfect sense. Thanks!
The reason I was studying the grammar is that I am considering a solution to this issue: http://code.google.com/p/wikimodel/issues/detail?id=87
I have posted a comment over there. Please, have a look at it.
It's great you work on that ! I don't have time right now to look at your patch in detail but first thing you can do is checking if your modification is not breaking anything, there is a lot a unit tests written for XWiki: - in org.wikimodel.wem.test.XWiki20ParserTest contains some of them - for the others tests you can build http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-rendering/xwiki... project with your modified version of WikiModel If all tests are passing would be already a good point for the quality of your patch ;) (we are not javacc experts ourself so most of the time it's the only thing that validate a modification we do)
Best regards,
Andreas Jonsson
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On Tue, Jan 12, 2010 at 10:54, Thomas Mortagne <[email protected]> wrote:
Hi,
On Mon, Jan 11, 2010 at 22:38, Andreas Jonsson <[email protected]> wrote:
Vincent Massol wrote:
We allow wiki syntax inside link labels. Thus you're allowed to create a link on an image. In term of HTML this means something like: <a href="...."><img src="...."/></a>
I see, that makes perfect sense. Thanks!
The reason I was studying the grammar is that I am considering a solution to this issue: http://code.google.com/p/wikimodel/issues/detail?id=87
I have posted a comment over there. Please, have a look at it.
It's great you work on that !
I don't have time right now to look at your patch in detail but first
Actually i could not resists, i added some comments ;)
thing you can do is checking if your modification is not breaking anything, there is a lot a unit tests written for XWiki: - in org.wikimodel.wem.test.XWiki20ParserTest contains some of them - for the others tests you can build http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-rendering/xwiki... project with your modified version of WikiModel
If all tests are passing would be already a good point for the quality of your patch ;) (we are not javacc experts ourself so most of the time it's the only thing that validate a modification we do)
Best regards,
Andreas Jonsson
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
-- Thomas Mortagne
participants (3)
-
Andreas Jonsson -
Thomas Mortagne -
Vincent Massol