AllenDowney / plastex-oreilly

Branch of plastex that generates DocBook 4.5 that meets O'Reilly style guidelines.
7 stars 7 forks source link

removing para tags with regular expressions is too fragile #2

Closed AllenDowney closed 12 years ago

AllenDowney commented 12 years ago

For example, if you have a \small before a \begin{itemize}, it causes the substitution in Renderers/DocBook/init.py to fail, and you get a parse error at the beginning of the next chapter.

To do this right, we should be modifying the tree representation of the document. That will also be faster.

AllenDowney commented 12 years ago

This is now implemented in tree_cleaner.py

There are still some regex substitutions, but fewer, and they are more robust.