Go to the FreeLists Home Page Home Signup Help Login
 



[dokuwiki] || [Date Prev] [12-2007 Date Index] [Date Next] || [Thread Prev] [12-2007 Thread Index] [Thread Next]

[dokuwiki] Re: darcs patch: parenthesis_escaper_fix

  • From: Stephane CHAZELAS <stephane.chazelas@xxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Wed, 19 Dec 2007 11:21:46 +0000
On Wed, Dec 19, 2007 at 10:52:41AM +0000, stephane.chazelas@xxxxxxxxxxx wrote:
> Wed Dec 19 10:38:58 GMT 2007  stephane.chazelas@xxxxxxxxxxx
>   * parenthesis_escaper_fix
[...]

Hiya,

sorry for the lack information in there. It was my first attempt
at using darcs to send a patch. I thought I'd have had an
opportunity to edit the email before sending it.

I've submitted a new "task" at bugs.splitbrain.org: 1302 for it.

I've run into the problem when trying to improve the "cli"
plugin.

I was using an ENTER regexp like:

<cli(?:"(?:\\.|[^\\"])*"|[^"\\])*>\r?\n?(?=.*?</cli>)

To allow things like: <cli prompt="\"">

But that caused erratic behavior.

I eventually found out that it was due to the
_getCompoundedRegex() function that improperly escaped the
parenthesis.

It was turning my regexp into:

'<cli(?:"(?:\\.|[^\\"])*"|[^"\\]\)*>\r?\n?(?=.*?<\/cli>)'
(note the \) above that shouldn't be there).

The patch I sent is an attempt to fix it. I also simplifies the
code slightly and might make it faster.

Please tell me what you think.

Cheers,
Stephane
-- 
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist




[ Home | Signup | Help | Login | Archives | Lists ]

All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
Everything else ©2007 Avenir Technologies, LLC.