[pmwiki-users] block preformat, spaceless?
Patrick R. Michaud
pmichaud at pobox.com
Fri Mar 18 22:17:25 CST 2005
On Fri, Mar 18, 2005 at 09:04:59AM -0500, Russ Fink wrote:
> Thanks for all your help. I'm struggling semantically to understand why
> the initial space is necessary, but that's okay, I don't pretend to
> understand things in cookbooks anyway ;-)
I'll try and explain it this way... [=...=] simply tells PmWiki
"Don't do anything special with what is inside -- leave it exactly as is."
This is true even if there are newlines inside the [=...=], they're
left alone and all of them are considered to be part of the line that
contains the opening [=.
Space at the beginning of a line says to treat whatever follows as being
preformatted text. So, space + [= ... =] says to treat whatever follows
as preformatted text. Since [=...=] has newlines in it, those newlines
are honored by the <pre> tag that results (whereas they're treated as
simple spaces by most other HTML tags).
It's just a convenience that the "lines w/spaces are preformatted" rule
combined with the "preserve [=...=]" rule results in a preformatted block.
However, authors continually miss its availability, even though it's
mentioned in PmWiki.TextFormattingRules in the section on [=...=]
escapes (among other places). So, we still need to point it out a bit
More information about the pmwiki-users