From: Reini U. <ru...@x-...> - 2004-06-19 07:28:52
|
I don't see any inconsistency with the usage of "~" as escape character, but I see the need to explain it better. "~ " (tilde space) => <~> and not <space> is the only exception, which is not documented, but it is what the user expects. Ok to add this paragraph to TextFormattingRules? !!! Character Formatting * All special HTML characters are displayed as is. Exceptions below. * See [Emphasis|#Emphasis]. * There's no syntax for font tags or color attributes. * The tilde '~~' is the _Escape Character_: ** A single tilde '~~' followed by nothing gets rendered as a single tilde. => ~ ** Two tilde '~~~~' get rendered as a single tilde. => ~~ ** A single tilde before a link ('~~http://foo.bar') prevents linking. => ~http://foo.bar ** Two tildes before a link ('~~http://foo.bar') produce a tilde followed by the hyperlinked URL. => ~~http://foo.bar ** A tilde inside an URL gets removed, unless it's formatted inside ~[ ~] brackets. Two tildes inside an URL (without brackets) become a single tilde. => [http://foo.bar/~user] or http://foo.bar/~~user Please note improvements at http://phpwiki.sf.net/phpwiki/TextFormattingRules We probably have to add a note about special non-ascii or non-latin characters, if it's supported by the native CHARSET or not, and how to add such chars. (e.g. japanese euc-jp chars to iso-8859-1 wiki's). Matthew Palmer schrieb: > Another bug report I've gotten: > http://bugs.debian.org/227953 > > Basically, ~ out by itself is still a tilde, but in contact with anything > else it's made invisible and will suppress specialness. > > Two problems with this: > > 1) It's inconsistent. While the rule isn't too hard to follow ("If the > tilde is touching anything, double it to make it display"), it's a PITA. > I'd be inclined to simplify it to "if you want a tilde, type two". > > 2) The method to produce a visible tilde is thoroughly undocumented in > TextFormattingRules, as far as I can see. Hence, discovering the rules is, > pretty much, up to individual experimentation. See the above-linked bug > report for a demonstration of one person's experimentation in that area. > > Do others consider the suppression of tildes when they are not used > immediately prior to a "special" text a bug? Should the remaining > exceptions be ironed out, or is it all good as-is and should just be > documented? > > - Matt -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |