[pmwiki-users] Pre-formatted text and trailing slashes

Patrick R. Michaud pmichaud at pobox.com
Mon Apr 2 16:15:06 CDT 2007


On Mon, Apr 02, 2007 at 01:53:36PM -0700, Martin Fick wrote:
> I am using pmwiki-2.1.10 and I have run into what I
> think should be a bug in the way that pre-formatted
> text (lines starting with a space) is handled?  A line
> that ends in \ is continued on the next line.  While
> that makes sense in normal wiki text, that does not
> make as much sense to me in pre-formatted text.  
> 
> Since I am using pre-formatted text to illustrate some
> shell commands, some of my lines use \ at the end
> because the shell command is continuing on the next
> line.  I would like to be able to see this \ and have
> the text actually wrap!  I realize that all I have to
> do for this is to make my line have an extra space at
> the end of it, but that just seems somewhat wrong
> inside of pre-formatted text?

The "leading space is preformatted text" doesn't disable
any of the other PmWiki markups -- they still remain in
effect.  The fact that trailing backslashes in preformatted
text still mean "line join" is intentional in this case,
as it provides a way to allow wikistyles and other markups
to apply across newline boundaries, even in preformatted text.

However, there are other ways to get what you want -- you can
   1.  add spaces to the end of the backslash, as you mentioned
   2.  surround the backslash with an escape, as in [=\=]
   3.  surround the entire block with [@...@], which escapes
       all markups (including the trailing backslash).

Pm



More information about the pmwiki-users mailing list