1
0
Fork 0
forked from github/pelican

include html comments properly in reader

This commit is contained in:
dave mankoff 2012-06-14 23:16:27 -04:00
commit 0373c15e43
3 changed files with 36 additions and 9 deletions

View file

@ -190,6 +190,8 @@ class HTMLReader(Reader):
def handle_comment(self, data):
if self._in_body and data.strip() == 'PELICAN_END_SUMMARY':
self.metadata['summary'] = self._data_buffer
else:
self._data_buffer += '<!--{}-->'.format(data)
def handle_data(self, data):
self._data_buffer += data