[pmwiki-users] Can't use twice in a row small emphasized text

Peter Kay pkay42 at gmail.com
Mon Mar 4 15:29:21 PST 2019


Another thing you could do (if for whatever reason, the order is important)
is to put a breaking pattern inside the problem markup:

[-''KO''[==]-][-''OK''-]

That way, '- doesn't appear in a place where it can trigger markup.

(You could also put it in both places, just to be safe from future
problems:  [-''KO''[==]-][-''OK''[==]-]  )

This is a useful trick to know, from time to time.

--Peter



On Mon, Mar 4, 2019 at 10:48 AM François Ingelrest <
francois.ingelrest at gmail.com> wrote:

> Hi,
>
> Thanks for the explanation, I didn't know about the '- -' syntax but I
> indeed ended up moving the emphasizing pattern outside the brackets
> like this:
>
> ''[-OK-]''''[-OK-]''
>
> Thanks !
>
> On Mon, 4 Mar 2019 at 16:40, Petko Yotov <5ko at 5ko.fr> wrote:
> >
> > Actually, there are 2 markup rules for smaller/bigger text:
> >
> > 1. '-small-'  '+big+'
> >
> > 2. [-small-] [--smaller--] [----tiny----]
> >     [+large+] [++larger++]    ... etc.
> >
> > The first markup rule is processed before the second one.
> >
> > With "[-''KO''-] [-''KO''-]" the middle part contains
> >
> >    '-] [-'
> >
> > which is converted by the first rule to HTML as "<small>] [</small>".
> >
> > Then from the rest only the first "[-" and the last "-]" are meaningful
> > and get processed.
> >
> > You can place the "em" '' markup outside the "small" blocks ''[-KO-]
> > [-KO-]'', or insert a space between in the middle of '- or if you must,
> > the null space [==].
> >
> > If you always use the second markup, you can disable the first one in
> > config.php:
> >
> >    DisableMarkup("'-");
> >    DisableMarkup("'+");
> >
> > Even if we were to swap the order of the rules, there will always be
> > some cases with ambiguity and markup rules can only be processed one
> > after another.
> >
> > Petko
> >
> > --
> > If you upgrade :  http://www.pmwiki.org/Upgrades
> >
> >
> > On 04/03/2019 16:04, François Ingelrest wrote:
> > > [-''KO''-] [-''KO''-]
> > >
> > > The [- ... -] pattern seems to be greedy when used in conjunction with
> > > quotes, and thus middle brackets are not properly interpreted. These
> > > lines work properly:
> > >
> > > ''OK''''OK''
> > > [-OK-][-OK-]
> >
> > _______________________________________________
> > pmwiki-users mailing list
> > pmwiki-users at pmichaud.com
> > http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20190304/9bdb7393/attachment.html>


More information about the pmwiki-users mailing list