From: Martin G. <gim...@gi...> - 2002-11-22 21:05:57
|
Hallo again, I think I've found a small but in the regexp that deals with nestled emphasis. The problem is, that you cannot start the emphasis immediately after one of (, ", or '. So the following doesn't work: (*foo* bar) (foo *bar*) (*foo bar*) Also, it's now possible to combine bold with italic, but not with monospace. (And it's also not possible to combine monospace with italic, but on my system monospace made the font upright, so I've left that possibility out. That's also why I left out the possibility of having all three kinds of emphasis in play simultaneously.) By the way, would you rather have me report these bugs using the SourceForge bug-tracking system, or is it okay to use the mailinglist for this too? Anyway, the revised class is here: class Markup_nestled_emphasis extends BalancedMarkup { //var $_start_regexp = "(?<! [[:alnum:]] ) [*_=] (?=[[:alnum:]])"; var $_start_regexp = "(?<= \s | ^ | [\"'(] ) (?: _\\* | \\*_ | =\\* | \\*= | [*_=] ) (?= \S)"; function getEndRegexp ($match) { //return "(?<= [[:alnum:]]) \\$match (?![[:alnum:]])"; $rev = preg_quote(strrev($match)); return "(?<= \S) $rev (?= \s | [.,:;\"'?)] | $)"; } function markup ($match, $body) { switch ($match) { case '*': return new HtmlElement('b', $body); case '=': return new HtmlElement('tt', $body); case '_': return new HtmlElement('i', $body); case '_*': return new HtmlElement('i', new HtmlElement('b', $body)); case '*_': return new HtmlElement('b', new HtmlElement('i', $body)); case '=*': return new HtmlElement('tt', new HtmlElement('b', $body)); case '*=': return new HtmlElement('b', new HtmlElement('tt', $body)); default: return new HtmlElement('b', new HtmlElement('i', $body)); } } } -- Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather => Shows the current weather on your webpage and PHP Shell => A telnet-connection (almost :-) in a PHP page. |
From: Jeff D. <da...@da...> - 2002-11-22 23:28:02
|
> By the way, would you rather have me report these bugs using the > SourceForge bug-tracking system, or is it okay to use the mailinglist > for this too? For small bugs with reasonably quick fixes, here is fine. (I certainly check this list more often than anything else.) Thanks for the reports. I've just committed fixes to CVS. Nestled markup within (*parentheses*) and _*nested* nestled_ markup should work now. |
From: Martin G. <gim...@gi...> - 2002-11-23 00:53:02
|
Jeff Dairiki <da...@da...> writes: >> By the way, would you rather have me report these bugs using the >> SourceForge bug-tracking system, or is it okay to use the mailinglist >> for this too? > > For small bugs with reasonably quick fixes, here is fine. (I > certainly check this list more often than anything else.) OK, great. My next patch is this: I've converted the default pages in /pgsrc to the new markup. I wanted to get rid of the old markup on my site, so I thought that I might as well start with the default pages. The pages can be downloaded here: http://gimpster.com/phpwiki/pgsrc.tar.bz2 http://gimpster.com/phpwiki/pgsrc.tar.gz http://gimpster.com/phpwiki/pgsrc.zip I've replaced the old TextFormattingRules with the new one made by Matti made. I've reformatted it a bit, so that the examples given in the text are formatted with <tt>...</tt>. I removed TestPage because it just tested the old markup. And while I was at it, then I re-flowed all the text, so that the lines are broken at 70 characters. Finally I placed the PhpHighlightPlugin page in the tarballs in the hope that it could be included in CVS... I've just updated the plugin, and put a patch here: http://www.gimpster.com/phpwiki/index.php/PhpHighlightPlugin#patch > Thanks for the reports. > I've just committed fixes to CVS. I saw, thanks. I don't understand how you were able to turn those regular expressions into something as structured as this - amazing! > Nestled markup within (*parentheses*) and _*nested* nestled_ markup > should work now. Yes, everything works beautifully! -- Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather => Shows the current weather on your webpage and PHP Shell => A telnet-connection (almost :-) in a PHP page. |
From: Jeff D. <da...@da...> - 2002-11-23 01:56:21
|
> OK, great. My next patch is this: I've converted the default pages in > /pgsrc to the new markup. Very good! I'll check in your new/converted pgsrc when I get to it on Monday. (If anyone thinks we shouldn't yet be converting the pgsrc to new markup, speak up now!) > Yes, everything works beautifully! That'll never last... |
From: Carsten K. <car...@us...> - 2002-11-23 06:19:05
|
Sounds good, having all the default pages in new markup will help demonstrate the markup. Carsten On Friday, November 22, 2002, at 08:56 pm, Jeff Dairiki wrote: > (If anyone thinks we shouldn't yet be converting the pgsrc to > new markup, speak up now!) > -- Carsten Klapp -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GE d-@+ s+:- a C+++@(---) UB+++ P+>++ L+>++ E>++ W-(++) N-(+) o? K? !w---- O M+(++) V? PS+ PE-(--) Y+ PGP+>++ t+@ 5 X+@ R tv+(-) b+ DI++ D- G e(+) h(---) r y z? ------END GEEK CODE BLOCK------ |
From: Jeff D. <da...@da...> - 2002-11-25 19:58:18
|
On Sat, 23 Nov 2002 01:51:55 +0100 Martin Geisler <gim...@gi...> wrote: > http://gimpster.com/phpwiki/pgsrc.tar.bz2 > http://www.gimpster.com/phpwiki/index.php/PhpHighlightPlugin#patch All checked into CVS just now... Thanks for all the work, Martin! |