Hi there, I've just tried to extend WikiStyles to be able to apply them to a single table cell & table row (when written using the simple markup for tables). I've spotted a $WikiStyleApply variable in wikistyles.php and added the following line:
SDVA($WikiStyleApply,array( 'row'=>'tr', 'cell'=>'td' )); Then, in page contents, I create a table using the "simple" markup: || %apply=row bgcolor=red% bar1 || bar2 || || %apply=cell bgcolor=green% bar3 %% || bar4 || Now, 'row' seems to work OK - it appends "style='background-color: red;'" to the <tr> element in this row. However, 'cell' works strangely: it appends "style='background-color: green;'" to *both* <td>s in the cell row!! (Note the double-percent I tried to use to overcome this.) I tried to find the reason for that in wikistyles.php, but the code is quite difficult there, with much tables juggling sprinkled with some quite long regexps. Do you have some ideas as to where can this behaviour be located? or how to overcome this, that would fit me as well :) I'd be grateful also for clues regarding which line is responsible for this strange behaviour, and which part of it especially. Any help will be appreciated. Greetz, and happy hacking :) Mateusz Czaplinski I know I can do it with extended table markup, like (:cell style="...":), but for my application I'd really prefer the simple markup. _______________________________________________ pmwiki-devel mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-devel
