[pmwiki-users] Re: Re: Modified (:markup:)
chr at home.se
chr at home.se
Sun Mar 20 14:09:37 CST 2005
On Sun, 20 Mar 2005, Patrick R. Michaud wrote:
> Well, it's more than that -- we're using it to pass *unparsed* arguments.
> That's important. And it's not "sudden" -- we've done similar things
> in several Cookbook recipes -- for example the Beautifier, CodeBlock, and
> SourceBlock recipes.
It's sudden for me, I've never used any of those recipes ;-)
> > In addition, I'm very uncertain about how the whitespace is really
> > interpreted by (:markup:), i.e. what whitespace is really significant?
>
> I never intended (:markup:) to be so precise that whitespace would be
> an important issue.
Ah... although I think it should be precisely defined at least, since it'd
be very convenient to be able to document (almost?) all markup using
(:markup:). That's seems solved further down so it's not an issue though.
> Er, no, if only because the order of operations is misplaced here. The
> current (:markup:) directive takes place very early in the sequence --
> even before [=...=] is processed.
Oh... ok, I see. That's not exactly apparent btw... I assume (:markup:)
is done before (:include:) as well? These other recipes, are they also
handled before [=...=]?
> And I *really* dislike the idea of directive markups that span multiple
> lines in a single directive, as in
>
> (:markup [=
> * Here's an example list
> * more list
> =]:)
Mileage varies I guess... to me it's not that different from:
[[This is the link text \
-> http://long.and.complicated.uri/much/too/long/in/fact]]
but that doesn't mean I like it of course.
> > Here's a relatively simple example...
> > (:markup:)You can use [=[==]...=] to escape things.(:markupend:)
> > ------------ -- -----------------------
> > "You can use [=...=] to escape things."
Hmm... if (:markup:) is parsed before [=...=], couldn't the above simply
be written as:
(:markup:)
You can use [=...=] to escape things.
(:markupend:)
That'd be very convenient... or is '[=...=]' parsed later on in this case?
If it is parsed, I guess we could illustrate (:markup:) like this:
(:markup:)
You can use
(:markup:)
Here is '''bold''' text.
(:markupend[==]:)
to illustrate markup.
(:markupend:)
> This example illustrates almost perfectly the problem with nested [=...=]'s
> of any sort -- there are a lot of people who would've quite reasonably
> expected the above to produce:
>
> "You can use [==]... to escape things."
I used to expect that, but long/hard experience with pmwiki has tought me
otherwise... ;-)
> Ultimately I don't know that there are many cases where I want or need
> to be able to do (:markup:)...(:markupend:) all on a single line.
I'd be fine with requiring (:markup:) and (:markupend:) to be on lines by
themselves.
> I'm thinking that (:markup:) should be restricted to being on a line by
> itself, with any trailing whitespace (including the newline) stripped
> before processing the contents.
Sounds good. That also clearly states how whitespace will be "handled".
> Then we can also allow (:markup:) with a single escaped string on the
> same line.
Eh... with "the same line", do you mean:
(:markup:) [=Bla bla [[link]] bla=]
or
(:markup:) [=
Bla bla ...
=]
?
> If you really want to allow non-escaped strings on the same
No need. I guess it's consistent with e.g. (:table:) ... (:tableend:)
that also have to be on lines of their own?
> > I have a feeling this might conflict with earlier cases where I've written
> > similar text just in order to escape things properly... and in addition I
> > get the feeling we're opening a huge can of worms with this... might work
> > though.
>
> It still works because [=...=] processes exactly the same as before.
> I've already implemented and tested it on pmwiki.org.
For instance, I've sometimes written "Wiki[==]Word" to prevent a word
from being treated as a wiki word (this was with pmwiki v1). What happens
on a line like this:
The Pm[==]Wiki [[engine]] is useful and allows Wiki[==]Words.
Would [[engine]] become a link or not?
/Christian
--
Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
More information about the pmwiki-users
mailing list