[pmwiki] Re: [Pmwiki-users] Whitepaper about markup strategy

Patrick R. Michaud pmichaud at pobox.com
Sat May 17 11:28:57 CDT 2003


On Sat, May 17, 2003 at 08:16:06AM +0200, Jean-Claude Gorichon wrote:
> 
> | If you want these, add the following to local.php:
> | 
> | $InlineReplacements['/\\[\\*(.*?)\\*\\]/'] = "<strong>\$1</strong>";
> | $InlineReplacements['/\\[\\/(.*?)\\/\\]/'] = "<em>\$1</em>";
> | $InlineReplacements['/\\[\\*\\/(.*?)\\/\\*\\]/'] = 
> |    "<em><strong>\$1</strong></em>";
> | $InlineReplacements['/\\[_(.*)_\\]/'] = "<u>\$1</u>";
> | $InlineReplacements['/\\[=\\]/'] = "<br>";
> 
> Well! ['/\\[=\\]/'] = "<br>"; does not work ([= already in use ).

Hmm, it doesn't work?  It seems to me like it would work okay as long
as there's not another bare =] on the same line:

	A line break [=] here works because there's no closing equals+bracket.

	A line break [=] works even if there are [=escaped sequences=],
	because PmWiki always uses the smallest such enclosed sequence.

	A link break [=] would not work if there's a =] (but no matching [=)
	on the line somewhere.


> I suggest  ['/\\[.\\]/'] which works fine ( a full stop between square brackets)

Actually this would have to be '/\\[\\.\\]/' or else it'll match any
single character between two brackets (the '.' is special in regexps).

> Also, on my server at least, */ --- */ does not work properly, 
> neither /* --- */. I have no fix nor explanation for that!  

Ummm, what's the pattern you're using?  It should be something like

	'/\\*\\/ --- \\*\\//'
or	'/\\/\\* --- \\*\\//'

Pm




More information about the pmwiki-users mailing list