[pmwiki-users] (:nl:) not displaying correctly?

Patrick R. Michaud pmichaud at pobox.com
Thu Mar 15 15:14:47 CDT 2007


On Thu, Mar 15, 2007 at 07:51:49PM +0000, Francis Casson wrote:
>    >From what I understand from
>    http://thread.gmane.org/gmane.comp.web.wiki.pmwiki.user/15031/focus=15088
> 
>    The example at http://www.pmwiki.org/wiki/Test/Newline is not displaying
>    correctly. 

It is displaying correctly.  The (:nl:) markup says to add a newline into
the markup if one doesn't already exist at that point.  If there's a newline
immediately preceding or following the (:nl:), then it's simply removed.

So, in the Test.Newline example:

     A line of text(:nl:)(:nl:)more text. 

The first (:nl:) is converted to a newline, resulting in

     A line of text
     (:nl:)more text.

The second (:nl:) immediately follows a newline, so it is removed, resulting in

     A line of text
     more text.

And this is rendered as a single paragraph.  If you set (:linebreaks:) in
the markup, you'll see that they come out on separate lines.

The purpose of the (:nl:) markup is to allow (:include:)
and other features to combine parts of pages together without 
accidentally joining two lines together, or ending up with "extra" 
newlines or vertical space in the resulting markup.  (I can give
a longer example if one is needed here.)

What are you wanting to do with (:nl:) in this particular instance?
If you just want to force a new paragraph, use a blank line:

    A line of text

    more text

If you want to force a line break, use the \\ markup:

    A line of text\\
    more text

If you want to force a blank line without starting a new paragraph, use \\\:

    A line of text\\\
    more text

Pm




More information about the pmwiki-users mailing list