[pmwiki-users] Simple table grid with single character cells

Martin Fick mogulguy at yahoo.com
Sat Oct 21 23:47:37 CDT 2006


--- Pico <pmwiki at ben-amotz.com> wrote:

Tested with these exact lines:

> ||1||+||2||+||3||+||4||+||1||+||2||+||3||+||4||+||  
>     ||
> ||X|| || ||X|| || || ||X|| || ||X|| ||X|| || ||
> ||Clave  ||
> || || ||S||S|| || ||O||O|| || ||S||S|| ||
> ||O||O||Quinto ||
> ||O|| || ||B||S|| || ||B||S|| || ||B||O|| ||O||
> ||Conga  ||
> ||M|| || || ||M|| || || ||M|| || ||O|| || || ||
> ||Bombo  ||
> 
> 
> Could be generated by the following lines of
> proposed table grid markup:
> 
> |||1+2+3+4+1+2+3+4+|||       ||
> |||X  X   X  X X   |||Clave  ||
> |||  SS  OO  SS  OO|||Quinto ||
> |||O  BS  BS  BO O |||Conga  ||
> |||M   M   M  O    |||Bombo  ||

Markup('^|||..|||', '<||',
'/^((?:\|\|[^|]+)*\|\|)\|([^|])([^|]+\|\|\|)((?:[^|]+\|\|)*)$/e',
'PRR("$1$2
|||$3$4")');

Markup('^|||.|||', '>|||..|||',
'/^((?:\|\|[^|]+)*\|\|)\|([^|]\|\|)\|((?:[^|]+\|\|)*)$/e',
'PRR("$1$2$3
")');

It's ugly (and probably very slow and inefficient) and
I don't know how to combine the two rules, but it
seems to work.  Enjoy. :)

-Martin


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the pmwiki-users mailing list