[pmwiki-users] custom markup/regular expression help

Bronwyn Boltwood bronwyn at bronwynb.info
Wed Apr 26 14:48:41 CDT 2006


On 22 Apr 2006 10:24:46 +1200, John Rankin <john.rankin at affinity.co.nz> wrote:
> On Saturday, 22 April 2006 8:57 AM, J. Meijer <commentgg at hotmail.com> wrote:
> >
> >On 4/21/06, Bronwyn Boltwood <bronwyn at bronwynb.info> wrote:
> >>I need 3 nestable, easy-to-use custom markups, since wikistyles are a pain
> >>when used every few words.  They would be:
> >>- application term or label
> >>- required field
> >>- linked field
>
> Or borrow an unused html tag such as <kbd> and <cite> and
> specify a special css rule plus a new set of markups...
>
> When developing the markup extensions, I found
> '<special character> ... <special character>' was quite a
> flexible and easy-to-remember markup structure. For example,
> I used '@ ... @' for <kbd> and '/ ... /' for <cite>.
> You need 3 so perhaps something like:

Hm.  How about these instead?

## ;application text;
    Markup(";app","inline","/;(.*?);/",'<cite>$1</cite>');
## ;*required field*;
    Markup(";*req","inline","/;\*(.*?)\*;/",'<cite class="req">$1</cite>');
## ;[link or button];
    Markup(";[link","inline","/;\[(.*?)\];/",'<cite class="link">$1</cite>');
## ;[*required field that is also a link or button*];
    Markup(";[*rlink","inline","/;\[\*(.*?)\*\];/",'<cite class="req
link">$1</cite>');

I hacked away at the '/cite/' rule from Markup Extensions to make
those.  I'm sure there are some problems with them, so suggestions are
welcome.

I've been very busy (new job with long commute), which is why I've
been so slow to respond.  I'm documenting procedures that I use in my
new job, and so my wikipages are littered with terms belonging to the
applications that I'm using, like our CRM software.  It's helpful to
have them look different.  (I may not always have the time to do it
that way, but I can try.)  That's what I want the markups for, and why
they must be easy to type, and easy to mix.

Thanks!
--
"I have learned two ways to tie my shoes. One way is only good for
lying down. The other way is good for walking." -- Valentine Michael
Smith, _Stranger in a Strange Land_ by Robert A. Heinlein




More information about the pmwiki-users mailing list