(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-29) was last changed on 07-Mar-2008 00:49 by RadomirDopieralski  

This page was created on 12-Jan-2007 16:32 by RadomirDopieralski

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Difference between version and

At line 1 changed one line
The nowiki and preformatted markup syntax doesn't let us quote actual markup for nowiki and preformatted -- this is especially needed when talking about the syntax or explaining it.
The nowiki and preformatted markup syntax doesn't let us quote actual markup for nowiki and preformatted themselves-- this is especially needed when talking about the syntax or explaining it. That's why there is a need to modify or extend the syntax, so that it is possible to include "{{{~}}}}}}" in them.
At line 3 changed one line
One possible solution is to include any trailing "}" into the nowiki or pre block, like this: {{{{{{foo~}}}~}}}}}} produces {{{<nowiki>foo~}}}</nowiki>}}}. This solution, however, only allows you to put the curly braces at the end of the block. While this is enough for our current use cases, it's not a general solution.
The solution chosen for nowiki is to include any trailing "}" into the nowiki span, so that this:
At line 5 changed one line
That's why it may be good to have a special markup, as an exception parsed inside the pre and nowiki blocks, that "escapes" the closing of these blocks. Even when it's just adding special cases, as now we can't possibly inslude *that* markup in a pre block.
{{{
{{{foo}}}}}}
}}}
At line 7 changed one line
Note, that -- as the escape is only valid inside the pre blocks, and then only before the actual end marker -- there is little chance for conflict.
will produce (for whatver actual markup is used instead of {{{<nowiki>}}}):
At line 9 changed 36 lines
----
!Tilde "~"
Advantages:
* Used on:
** JSPWiki
* Has semantic connotation wit "not", which might suggest the meaning when seen
Disadvantages:
* Not available on many [Keyboards]
* Hard to type under Microsoft Windows (Could you be more precise? I have no trouble typing it using MS Windows with a US or German keyboard)
* Traditionally used in text as an alternative to hyphen (eg. in number ranges) or meaning "roughly".
----
!Backslash "\"
Advantages:
* Extremely widespread for escaping in:
** Programming languages
** File names
** Regular expressions and search queries
Disadvantages:
* Used in Microsoft Windows for paths
* A bit confusing considering the double backslash proposed in Creole 0.4.
----
!Caret "^"
Advantages:
* Sometimes used to mean "not"
Disadvantages:
* Not on all [Keyboards]
* No precedent (?)
----
!Percent "%"
Advantages:
* Commonly used for an alternate escape character, when backslash is not available
** for printf parameters
** for time and date formatting
** for colored text
Disadvantages:
----
{{{
<nowiki>foo}}}</nowiki>
}}}
The preformatted markup syntax requires some kind of an escaping mechanism. Fortunately, the escaping is only necessary when there is "{{{~}}}}}}" at the beginning of a line present in the block. In this case, to avoid treating the braces as markup for the end of the block, it needs to be indented with a single space. Furthermore, any line consisting of only indented three closing curly braces will have one space removed from the indentation -- to allow representing any possible text inside the preformatted block.
So, for example, this markup:
{{{
int main(int argc, char *argv[]) {
if argc>0 {
if argc<=1 {
--argc;
}}}
}}}
will produce this result:
{{{
<pre>
int main(int argc, char *argv[]) {
if argc>0 {
if argc<=1 {
--argc;
~}}}
}}}
Version Date Modified Size Author Changes ... Change note
29 07-Mar-2008 00:49 1.365 kB RadomirDopieralski to previous restore
28 06-Mar-2008 21:45 0.096 kB 217.221.90.178 to previous | to last vbtwueogzr
27 12-Sep-2007 11:13 1.365 kB YvesPiguet to previous | to last restore (spam)
26 12-Sep-2007 00:03 0.357 kB 87.248.181.211 to previous | to last None
25 08-Sep-2007 13:05 1.365 kB MarkWharton to previous | to last spam
24 08-Sep-2007 10:25 0.51 kB 87.248.181.211 to previous | to last None
23 05-Sep-2007 15:57 1.365 kB YvesPiguet to previous | to last restore (spam)
22 05-Sep-2007 13:31 0.431 kB 87.248.181.211 to previous | to last None
21 30-Aug-2007 14:07 1.365 kB YvesPiguet to previous | to last restore (spam)
« This page (revision-29) was last changed on 07-Mär-2008 00:49 by RadomirDopieralski