@PowerGlove do you think it would be possible to set up something like this to work on tables?
[table]
[tr][td style="background-color:#f0f0f0;"]Line 1[/td][/tr]
[tr][td style="background-color:#e0e0e0;"]Line 2[/td][/tr]
[tr][td style="background-color:#f0f0f0;"]Line 3[/td][/tr]
[/table]
Hmm... Do you want the background color to affect just the cell's contents, or the whole extent of the cell?
If it's the former (the cell's contents), then I did
a patch some time ago to clean up the
[glow] tag. It basically turns the
[glow] tag (in a backward-compatible way) into something that always gets converted into a
<span> with a
style="background-color: $color;" on it, so it doesn't need the extra parameters that the previous
[glow] tag used.
With it, you could write your example like this:
[table]
[tr][td][glow=#f0f0f0]Line 1[/glow][/td][/tr]
[tr][td][glow=#e0e0e0]Line 2[/glow][/td][/tr]
[tr][td][glow=#f0f0f0]Line 3[/glow][/td][/tr]
[/table]
If it's the latter (the cell's extent), then that's much trickier. I spent a few hours (before giving up in frustration) trying to get the BBCode parser to correctly handle something like
[td bgcolor=#e0e0e0]. At first glance, that would seem to be a very simple job, but there are a ton of strange interactions in the
parse_bbc function (including one between descriptors with both a
parameters key and a
require_parents key). I can get close, but I can't shake out all the bugs without making deeper changes to that function. Probably it's down to that code being hacked on by different programmers at different times, but the BBCode parser in its current state is a very fragile, barely working POS.
