From: Reini U. <ru...@x-...> - 2004-06-19 12:05:54
|
Matthew Palmer schrieb: > On Sat, Jun 19, 2004 at 12:50:26PM +0200, Reini Urban wrote: >>Matthew Palmer schrieb: >> >>>On Sat, Jun 19, 2004 at 09:28:49AM +0200, Reini Urban wrote: >>> >>> >>>>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? >>> >>> >>>Is there no chance that the logic can be simplified somewhat? There are 7 >>>separate tilde rules in that list -- basically, someone thinking "what are >>>the tilde-handling rules in PHPWiki?" is going to fill their brain's L1 >>>cache. >>> >>>What about "single tilde suppresses specialness, and under no circumstances >>>gets printed, two tildes produces one visible tilde"? In other words, "if >>>you want a tilde, give two". >> >>There is only one rule ("The tilde '~' is the Escape Character") and six >>examples. > > No, there's six other rules, dealing with exceptions to the rule you've just > provided. If there weren't any rules other than the one you provided, there > would be no way to display a tilde, because there would be no rule providing > that functionality. ok, for the language lawyers: There is only one rule ("The tilde '~' is the Escape Character") and two minor exceptions raising the importance of the whitespace rule and the bracketurl link: apply rule 1: '~~' => ~ apply rule 1: '~link' => ~link (escape the link) apply rule 1: '~~link' => ~[link] apply rule 1: 'link~user' => [linkuser] (escape the u) exception 1: (formally strict this is in an exception, but with the whitespace rule above is not) '~ ' => ~ exception 2: (formally strict this is in an exception, but with the "brackets force links" rule below it is not) '~' inside brackets are not escaped. Both exceptions seem to be natural, and would barely need special documentation. Thats why Jeff didn't see the need to add it to TextFormattingRules. Now with the examples it should be clear. All these rules only apply to NewMarkup. OldMarkup has a more complicated ruleset of escapes: "[[" => [, "]]" => ] !WikiWord => WikiWord (escape the link) -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |