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

Pico pmwiki at ben-amotz.com
Sat Oct 21 23:53:21 CDT 2006


Martin Fick wrote:
> --- 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. :)
> 

Thank you Martin!


Pico

-- 

         __  /
        /   /
       /___/ _/  ___/  __  /
      /      /  /     /   /
    _/     _/  ____/ ____/

 >>>===pmwiki at ben-amotz.com===>




More information about the pmwiki-users mailing list