Changeset 452
- Timestamp:
- Wed Dec 6 14:54:11 2006
- Files:
-
- stuff/sandbox/elementlib/ElementSoup.py (modified) (diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
stuff/sandbox/elementlib/ElementSoup.py
r433 r452 5 5 import BeautifulSoup as BS 6 6 7 # soup classes that are left out of the tree 8 ignorable_soup = BS.Comment, BS.Declaration, BS.ProcessingInstruction 9 7 10 # slightly silly 8 11 try: … … 51 54 def emit(soup): 52 55 if isinstance(soup, BS.NavigableString): 53 if isinstance(soup, BS.Comment):56 if isinstance(soup, ignorable_soup): 53 56 return 54 57 bob.data(unescape(soup))
