(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-3) was last changed on 21-Jun-2007 11:02 by ChristophSauer  

This page was created on 20-Jun-2007 18:35 by ChuckSmith

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Difference between version and

At line 5 changed one line
This requires that a nowiki block have no leading spaces to start and no leading spaces to end. So, the triple curly braces must start the line. Therefore, if you want to display triple curly braces within a nowiki block, you would put a space in front of them, since only triple curly braces at the beginning of a line end a nowiki block. This solution also makes it impossible to display closing triple curly braces inline.
This requires that a nowiki block have no leading spaces to start and no leading spaces to end. So, the triple curly braces must start the line. Therefore, if you want to display triple curly braces within a nowiki block, you would put a space in front of them, since only triple curly braces at the beginning of a line end a nowiki block.
At line 7 added 20 lines
To include closing braces where they might be considered as nowiki or preformatted end tag, there are two additional rules:
* In inline nowiki, any trailing closing brace is included in the nowiki span (i.e. in a sequence of more than three closing braces, the end marker is made of the //last three braces//).
* In preformatted blocks, since markers must not be preceded by leading spaces, lines with three closing braces which belong to the preformatted block must follow at least one space. In the rendered output, one leading space is removed.
//**Note: the Creole markup used for the code sample below must be correct, but it isn't rendered correctly yet by the Wikicreole engine. [[YvesPiguet]]//
Creole:
{{{
Inline nowiki with closing braces: {{{if (a>b) { b = a; }}}}.
Preformatted block with a line containing three closing braces:
{{{
{{{
if (x != NULL) {
for (i = 0; i < size; i++) {
if (x[i] > 0) {
x[i]--;
}}}
}}}
}}}
At line 9 changed one line
Another method is to display the triple curly braces if a tilde is put in front of them like ~}}}. This is the way JSPWiki works and therefore is [[Not New]].
The spaces rule was proposed before we had a general [[Escape Character Proposal]]. Therefore another method is to display the triple curly braces if a tilde is put in front of them like ~}}}. This is the way JSPWiki works and therefore is [[Not New]]. Note that tildes are not escaped in nowiki by this rule, just the sequence "~}}}":
At line 31 added 18 lines
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)
{{{
{{{
Inline nowiki with closing braces: {{{if (a>b) { b = a; ~~}}}.
Preformatted block with a line containing three closing braces:
if (x != NULL) {
for (i = 0; i < size; i++) {
if (x[i] > 0) {
x[i]--;
~~}}}
~}}}
}}}
Version Date Modified Size Author Changes ... Change note
3 21-Jun-2007 11:02 2.569 kB ChristophSauer to previous added extensive explanation, tried to keep a npov
2 21-Jun-2007 10:56 2.567 kB ChristophSauer to previous | to last added extensive explanation, tried to keep a npov
1 20-Jun-2007 18:35 0.981 kB ChuckSmith to last new page
« This page (revision-3) was last changed on 21-Jun-2007 11:02 by ChristophSauer