Split [[span]] pairs at the [[div]] boundaries they cross.
Wikidot pairs [[span]] with [[/span]] before it parses [[div]], so a
span may open inside a div and close after it. HTML Tidy then repairs the
output by closing the span at each block boundary and reopening it with the
same attributes on the other side. Rewriting the token stream the same way
keeps every span local to one block, so the regular span and div rules
produce the repaired structure.
Split
[[span]]pairs at the[[div]]boundaries they cross.Wikidot pairs
[[span]]with[[/span]]before it parses[[div]], so a span may open inside a div and close after it. HTML Tidy then repairs the output by closing the span at each block boundary and reopening it with the same attributes on the other side. Rewriting the token stream the same way keeps every span local to one block, so the regular span and div rules produce the repaired structure.