00722: Whitespace indentation rule behavior

Summary: Whitespace indentation rule behavior
Created: 2006-04-19 18:45
Status: Closed - exists by design
Category: Bug
From: Pico
Assigned:
Priority: 42
Version: 2.1.5
OS:

Description: (Revised) The whitespace indentation rule causes most start of line markup to be honored, or ignored (displayed as literal), depending on whether the whitespace is lined up with the prior item. It seems to work with most start of line markup, but not with the >>style block<< shortcut, which, like other div markup, is only honored when it appears at the start of a line.

*Regular item (to set required reference)\\
 Text with space
 !Heading with space
 ----
 >>blue font-style=italic bgcolor=#ffffcc<<
 Style treated as literal 
 >><<
  • Regular item (to set required reference)
    Text with space

    Heading with space


    >>blue font-style=italic bgcolor=#ffffcc<< Style treated as literal >><<

Should whitespace indent honor >>block style<< shortcuts (and other divs), in the same way as other start of line markup? Or is this just a function of the current rules that divs can't be nested?

While the whitespace rule can be used to generate multi-level lists --

*No spaces
 *One space
  *Two spaces
   *etc
  • No spaces
    • One space
      • Two spaces
        • etc

WikiTrails ignores list items that use whitespace indentation. That may not be a bug, however, since WikiTrails will similarly ignore other list items depending on the underlying markup used, rather than the resulting html rendered.

In the end, while the whitespace rule is very cool, espacially in the way it deals with start of line markup, authors need to keep in mind the basic alignment dependency, where the initial reference lines control whether subsequent whirespace lines are lined up (thereby invoking the whitespace indentation rule) or not lined up (in which case they are treated as literals). Pico May 03, 2006, at 10:48 PM


The rule that lines beginning with a space are formatted exactly as typed appears to have an exception for lists, where spaces at the start of a line signal new levels of a multi-level list. For example:

*No spaces
 *One space
  *Two spaces
   *etc
  • No spaces
    • One space
      • Two spaces
        • etc

Is this a bug or a feature?

Read the Release Notes - this is already described under Version 2.1.0 (2006-03-12) Sean? April 20, 2006, at 06:18 AM

Very interesting, esp the style vs heading behaviour - thanks. I vote bug for reason of inconsistency. Sean? April 22, 2006, at 08:25 AM

See BugOrFeature for more examples and solicited commentary from the mailing list.


This isn't really a "bug", in that PmWiki is working as it was designed to work; i.e., the whitespace indent doesn't work for directive tables or for section markups.

There's a case to be made that it *should* work for section markups, but that would require a major rewrite of the current rendering engine.

Pm