At line 7 changed one line |
First, I need to handle inline comment enclosed in curly braces (this is a common notation in set theory, like {A, B}). So if I have four open curlies followed by four closes, how do I handle that? One provisional solution I'm considering is associating the extra close curlies with the ''inside'' of the span, so the regex for the closing markup is three closing curlies not followed by a fourth: {{\}\}\}(?!\})}} in Python syntax, for the coders out there. This would also provide an escape for three or more closing curlies inside a span: just follow those with three closing curlies followed by three opening ones, to open a new span. |
First, I need to handle inline comment enclosed in curly braces (this is a common notation in set theory, like {A, B}). So if I have four open curlies followed by four closes, how do I handle that? One provisional solution I'm considering is associating the extra close curlies with the ''inside'' of the span, so the regex for the closing markup is three closing curlies not followed by a fourth: {{{\}\}\}(?!\})}}} in Python syntax, for the coders out there. This would also provide an escape for three or more closing curlies inside a span: just follow those with three closing curlies followed by three opening ones, to open a new span. |
At line 328 changed one line |
A way to escape "}}}" in inline nowiki sections is also needed. I see two main alternatives: |
A way to escape "}}}" in inline nowiki sections is also needed. I see three main alternatives: |
At line 332 added one line |
# Use the general escaping mechanism. But that would require user to take care of the escape char, when it appears in nowiki text. |
At line 335 added 73 lines |
|
Just to clarify, this substitution would work for both blocks and inline nowiki sections: |
|
{{{ |
"/} ( *)(?=})/" |
=> |
"}$1"; |
}}} |
|
The rule "to include any trailing '}' into the nowiki span" should also be applied. |
|
-- [[Michele Tomaiuolo]], 2007-03-05 |
|
Currently, the escape sequence for triple-right-brace in nowiki is {{{ }} }} }}{{{ }}} (without the spaces, |
which I've added because wikicreole doesn't support Creole 0.5 yet). Do we need more than |
that and normal escape character? |
|
-- [[YvesPiguet]], 2007-03-05 |
|
== Nowiki: really? |
|
Sorry for getting so late into the discussion, but I'd like anyway to tell my opinion about the matter: as [[Michele Tomaiuolo]] said, the tilde character cannot be typed in Italian keyboards (and I guess in other keyboards too) if not through a BlocNum Alt+ASCII combination. |
(Note: I have recently added the {{{ nowiki }}} syntax to [WikiOnAStick] in the not-yet-released v0.9.3 Beta) |
I am totally against an escape character in our wiki syntax because it looks like a mind trap to me, and it might make the WikiCreole rules complex and hard to learn. |
|
I will explain what's the best solution in my opinion: |
* no escape character either inside the {{{ nowiki }}} blocks and in the normal wiki source |
* support of a "raw" transclusion |
|
When your file includes the "}}}" you'd have to create a wiki page which will never be directly accessed but inline-transcluded in raw mode and shown without any wiki parsing. |
This would also be efficient in case of big ASCII files. |
|
-- [[DanieleC.]], 2007-Jul-05 |
|
The tilde is used in many programming languages and shells. I don't understand why an unused AltGr key combination isn't used |
on PC. Mathematica [[http://support.wolfram.com/mathematica/international/italiankit/keyboard.html|hints]] at a utility to add the tilde. On Mac, there is no such problem. [[http://en.wikipedia.org/wiki/Keyboard_layout]] shows that among roman keyboards, icelandic, hungarian and romanian layouts lack the tilde too. If you feel the escape is important in your wiki, you could explain how to type them |
with Alt, or have a button with Javascript to insert the character; otherwise, no problem... |
|
The motivation for the tilde has already been discussed at length. Raw transclusion has pluses and minuses, but it isn't suitable in all situations (not all converters can fetch secondary files). |
|
-- [[YvesPiguet]], 2007-Jul-05 |
|
Sorry for the apparently trivial reply: the average user won't type a character that he does not see on the keyboard ([AvoidSpecialCharacters]), I really feel that a slice of users is cut apart with the tilde - but if it's not the biggest slice, it could be anyway a good compromise. |
|
About raw transclusion: it is (in my opinion) the only "clean" solution because it would separate the raw block of text from the wiki markup text, any other solution would require to modify the raw block of text. Just my 2cents; by the way, thanks for the additional informations. |
|
-- [[DanieleC.]], 2007-Jul-06 |
|
=== User-defined block terminator === |
|
Here is one more idea for nowiki-block termination syntax - let user define the terminator: |
|
{{{ |
{{{TERM1 |
nowiki-text |
TERM1~}}} |
|
{{{MY-DELIMITER-2 |
another nowiki-text, which can contain even TERM1~}}} |
MY-DELIMITER-2~}}} |
}}} |
|
It can be used by advanced wiki users, who can include everything they like into nowiki-blocks in this way. Basic Creole 1.0 syntax is compatible with this concept (user-defined terminator defaults to empty string). |
|
Same idea is used in Perl for example: |
|
{{{ |
print <<EOT; |
blabla |
EOT |
}}} |
|
-- [[YaroslavStavnichiy]], 2007-12-15 |