[pmwiki-users] leading space rule? what rule?
Patrick R. Michaud
pmichaud at pobox.com
Thu May 25 17:21:37 CDT 2006
On Thu, May 25, 2006 at 03:04:02PM -0700, Jo Rhett wrote:
> On Thu, May 25, 2006 at 04:40:39PM -0500, Patrick R. Michaud wrote:
> > > [some-block-element like [=
> > > the entire block is preformatted text
> > > some-block-element]
> > I'm not sure what "block element" means in this context.
> > However, the space+[=...=] rule that others described (and that
> > still exists in several parts of the documentation) is highly
> > discouraged in PmWiki 2.1 -- authors should use [@...@] instead
> > for preformatted and uninterpreted text.
> I was extrapolating the idea I'd gathered that you could put a space before
> any block element and get preformatted text inside the entire block
> element. Is that true or not?
One can put a space before [=...=] and get preformatted text from it.
I don't think of [=...=] as being a "block element", at least not
in the HTML sense (since [=...=] doesn't produce any HTML tags on its
own). [=...=] is just a way to say "don't interpret markup here".
So, since PmWiki doesn't interpret anything inside the [=...=]
(including the newlines), space+[=...=] looks like a single line
to PmWiki, and it formats the whole thing (including the newlines)
as if it were a single line starting with whitespace. However, since
the newlines are left intact, and the leading space causes the
line to be rendered inside of a <pre>...</pre> HTML tag, it is
drawn as a multi-line block.
In early versions of PmWiki space+[=...=] was the "standard" way
to get preformatted text blocks, but now this is discouraged in
favor of using [@...@], which doesn't require the leading space.
> If not, then it sounds like leading space only matters to single lines and
> lists? ( if we forget about space+[=..=] )
So, to try to answer your question: yes, we should forget about
space+[=..=] (and remove it from the documentation), and we're just
left with the two cases of leading whitespace handling.
More information about the pmwiki-users