(anonymous guest) (logged out)

Copyright (C) by the contributors. Some rights reserved, license BY-SA.

Sponsored by the Wiki Symposium and the Nuveon GmbH.


Add new attachment

Only authorized users are allowed to upload new attachments.

This page (revision-7) was last changed on 05-Jul-2007 17:44 by DanieleC.  

This page was created on 21-Jun-2007 00:53 by YvesPiguet

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Difference between version and

At line 33 changed one line
- [[YvesPiguet]], 2007-Jun-21
-- [[YvesPiguet]], 2007-Jun-21
At line 35 added 48 lines
Sorry if my tone was overly dramatic, but this rule:
//To include closing braces where they might be considered as nowiki or preformatted end tag, there is one additional rule that
works for both inline and block: three closing curly brackets preceded by a tilde are escaped (although otherwise tildes do not escape in nowiki)//
does not allow for the sequence tilde+three closing braces at the beginning of a line.
Making tests in the [[http://sandbox.jspwiki.org/|JSPWiki sandbox]], the tilde works like spaces in the current Creole:
one tilde is removed when followed by three closing braces (but it's removed anywhere in block or inline nowiki). So it's a completely different kind of escape character than what we have at other places. BTW, JSPWiki and Creole would be
incompatible anyway, in the way leading spaces are used.
More tests in [[http://sandbox.jspwiki.org/|JSPWiki sandbox]] (I'll use ( and ) instead of braces here to make sure
the output is what I want), in inline nowiki:
* the tilde escapes three braces, not one: {{{(((foo ~))) bar)))}}} -> {{{foo ))) bar}}}, and {{{(((foo ~) bar)))}}} -> {{{foo ~) bar}}}
* how to have one trailing brace? I don't know: {{{(((foo ))))}}} -> {{{foo }}}) (with last brace outside nowiki), i.e. no greediness as in the current Creole; but {{{(((foo ~)))) etc.}}} -> {{{foo )))) etc.}}} with unterminated nowiki
So trying to solve the very uncommon case where we have three closing braces in the middle of nowiki, we break (if we
follow JSPWiki) the very common case where we have one trailing brace.
-- [[YvesPiguet]], 2007-Jun-21
What JSPWiki does is that a tilde disables the next directive, not the next character. If the next characters do not form a directive, the tilde is left as-is. Therefore one trailing brace you get simply by adding a single brace (separated with a whitespace), e.g. {{{ (((foo) ))) }}}. Now, since the JSPWiki parser is not based on a proper grammar (it's more of an adhoc stream parser), I wouldn't exactly rely on it as a model example for Creole. So it's better to define a good, solid, escape strategy and spec instead of relying on how JSPWiki //happens// to be working ;-)
BTW, the one trailing brace is not common. Never seen it anywhere, except in this discussion. Please provide proof of it being a very common case. However, in this wiki, I have seen several examples of triple braces in the middle of a nowiki block.
Yes, JSPWiki and Creole are incompatible. This is fine. It is not our intent to support mixed markup anyway.
-- [[JanneJalkanen]], 2007-Jun-21
Thanks for the insight, Janne.
Since braces are very common in C, C++, Java, JavaScript, PHP and other languages, we should expect code fragments
such as {{{while (!done) { doWork(); } }}} or {{{class Foo { int i; } }}}. Spaces can indeed be used for disambiguation, but
(i) one of the reasons mentionned by proponents of the escape character in nowiki was to avoid this use of
the space, and (ii) this introduces a superfluous space in the character stream, such as before the dot in the
previous sentence. I think another case where the problem occurs is a trailing tilde, e.g. when explaining that in most
unix shells, the home directory is represented by {{{~ }}}.
-- [[YvesPiguet]], 2007-Jun-21
Today I tried researching how other wikis escape the end of nowiki blocks and I discovered that none of them do! Do any wiki engines escape the closing tag of a nowiki block (besides JSPWiki) ?
-- [[ChuckSmith]], 2007-Jun-26
As I wrote on [[Talk.AddNoWikiEscapeProposal]], in my opinion there should be no escape character but the raw fragments should be put in a separate page (not accessed directly) and instead transcluded
-- [[DanieleC.]], 2007-Jul-05
Version Date Modified Size Author Changes ... Change note
7 05-Jul-2007 17:44 5.089 kB DanieleC. to previous
6 26-Jun-2007 15:48 4.852 kB ChuckSmith to previous | to last any other engines escape closing nowiki tag?
5 21-Jun-2007 16:58 4.622 kB YvesPiguet to previous | to last Spaces still needed for disambiguation
4 21-Jun-2007 16:09 3.906 kB JanneJalkanen to previous | to last
3 21-Jun-2007 13:17 2.915 kB YvesPiguet to previous | to last More
2 21-Jun-2007 11:37 2.181 kB YvesPiguet to previous | to last JSPWiki analysis
1 21-Jun-2007 00:53 1.3 kB YvesPiguet to last No!
« This page (revision-7) was last changed on 05-Jul-2007 17:44 by DanieleC.