Comment 2 for bug 1838903

Revision history for this message
Leonard Richardson (leonardr) wrote :

I've fixed this problem in two ways. As of revision 520, copies of tags propagate information originally obtained from the TreeBuilder, so .preserve_whitespace_tags won't be None. As of revision 518, _should_pretty_print() will function even if Tag.preserve_whitespace_tags _is_ None.

I don't see a good way to work around this without updating the code, so in revision 521 I made it possible to pass replacements for Tag and NavigableString into the BeautifulSoup constructor. That will make future workarounds easier.