[pmwiki-users] Bold text and indented text... its easy to make a mistake.

Patrick R. Michaud pmichaud at pobox.com
Tue Mar 7 10:53:05 CST 2006


On Tue, Mar 07, 2006 at 05:40:34PM +0100, a.steenveld at id.umcn.nl wrote:
> Hi,
> 
> There is a markup for writing '*this is bold*', note the single quotes around the text. Well, I don't like the single quotes, I want *this is bold*.
> 
> Changing the markup macro for it was not dificult, as a matter of 
> facts it is given as an example in the configuration file. 
> [...]
> Markup("'*", "inline", "/\\*(.+?)\\*/", "<b>$1</b>");    # '*bold*'

Note that this will cause you some problems  -- many times we have
asterisks on a line that aren't meant to indicate a bold term. For
example, try some of these:

   * This is a bullet item.
   * But this *isn't* a bullet item (guess why!)

   The formula   dist = sqrt( x * x + y * y )  is likely to be an issue too.

I do have a pattern that allows *bold* markups to work somewhat
more smartly; I just need to find time to publish them.  But the
simple version of *bold* given above can lead to problems.

Pm




More information about the pmwiki-users mailing list