Mercurial > jouvence
changeset 30:ff71a3e7fab0
html: Don't make a notes section if there are no notes.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 12 Jan 2017 09:18:36 -0800 |
parents | f5f29660fa6a |
children | 9ae14e9615e6 |
files | jouvence/html.py |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/jouvence/html.py Thu Jan 12 09:18:20 2017 -0800 +++ b/jouvence/html.py Thu Jan 12 09:18:36 2017 -0800 @@ -54,9 +54,10 @@ def write_footer(self, doc, out): out.write('</div>\n') # End `jouvence-main` - out.write('<div class="jouvence-notes">\n') - self._render_footnotes(out) - out.write('</div>\n') # End `jouvence-notes` + if self.text_renderer.notes: + out.write('<div class="jouvence-notes">\n') + self._render_footnotes(out) + out.write('</div>\n') # End `jouvence-notes` out.write('</div>\n') # End `jouvence-doc`