Thread
:
NYTimes - unclosed comment tag
View Single Post
05-21-2018, 09:38 AM
#
2
kovidgoyal
creator of calibre
Posts: 45,377
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
THe easiest way to get rid of comments is to use preprocess_regexps and simply replace them with an empty string. something like
Code:
preprocess_regexps = [(re.compile(r'(?s)<!--.*?-->'), lambda m: '')]
kovidgoyal
View Public Profile
Visit kovidgoyal's homepage!
Find More Posts by kovidgoyal
Track Posts by kovidgoyal via RSS