[pmwiki-users] Bold text and indented text... its easy to make a mistake.
a.steenveld at id.umcn.nl
a.steenveld at id.umcn.nl
Wed Mar 8 05:54:50 CST 2006
> Van: arndis at gmail.com namens Bronwyn Boltwood
> On 3/7/06, a.steenveld at id.umcn.nl <a.steenveld at id.umcn.nl> wrote:
> > > From: Patrick R. Michaud [mailto:pmichaud at pobox.com]
> ...
> But you might want to try these patterns that Pm made for me a while
> back -- they're a lot less troublesome:
>
> ## **bold**
> Markup('**', 'inline',
> '/(?<!\\*)\\*\\*(?>(\\S.*?)\\*\\*)(?<!\\s\\*\\*)(?!\\*)/',
> '<strong>$1</strong>');
> #
> ## //italic//
> Markup('//', 'inline',
> '/(?<!:)\\/\\/(\\S.*?[^\\s:])\\/\\//',
> '<em>$1</em>');
Here is another option.
Markup("_bold_", "inline", "/(?<!')_([^_]+?)_(?<!')/", "<b>$1</b>"); # _bold_
Is parses lines with text like: _bold_'_subscript_' and _bolt'_subscript_'_ or text'__subscript__' and text_'_subscript_'_ without any problems.
Sorry that I can't show you the life data, it is hidden behind a firewall.
-- Andre Steenveld.
More information about the pmwiki-users
mailing list