[Pmwiki-users] Line breaks again

Patrick R. Michaud pmichaud
Sat Aug 30 01:32:02 CDT 2003

On Sat, Aug 30, 2003 at 08:30:50AM +0200, bernhard at weichel21.de wrote:
> Thanks for that study. I personally would like to see
>   *bold*
>   _underline_
>   /italic/

Somehow I think that using bare slashes for markup (e.g., /italic/)
is likely to cause LOTS of problems, since slashes occur naturally
in many contexts, including URLs, filenames, fractions, and statements of
alternatives such as "and / or" and "either / or", etc.  I think
that slashes as markup are almost guaranteed to cause problems (note
that this line contains an example of one).

Also, in writing the above paragraph I've just realized that the
solution I proposed in my previous email has some problems with
it--in particular, writing "*bold*" would not work, nor would things 
modified in parentheses (like *this*) because of the lack of a whitespace 
character after the asterisk/underscore.  So the pattern needs to be 
modified even further:

  $InlineReplacements["/\\B\\*(.*?[^*].*?)\\*\\B/"] = "<b>\$1</b>";
  $InlineReplacements["/\\b_(.*?[^_].*?)_\\b/"] = "<i>\$1</i>";

I've gone ahead and implemented this at
so that people can provide more test cases and comments.  When we
finally come up with a sufficiently robust pattern I'll add it to the 


More information about the pmwiki-users mailing list