From: Matthew P. <mp...@he...> - 2004-06-18 15:05:53
|
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 |
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/ |
From: Matthew P. <mp...@he...> - 2004-06-19 08:40:30
|
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". - Matt |
From: Reini U. <ru...@x-...> - 2004-06-19 10:50:33
|
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. -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |
From: Matthew P. <mp...@he...> - 2004-06-19 10:56:39
|
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. - Matt |
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/ |