Skip to content
This repository has been archived by the owner on Sep 5, 2019. It is now read-only.

Commit

Permalink
Fixes adding mini html for an empty string throwing an error
Browse files Browse the repository at this point in the history
  • Loading branch information
msom committed May 21, 2018
1 parent f274fcb commit 3f53c49
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions HISTORY.rst
@@ -1,5 +1,9 @@
Changelog
---------

- Fixes adding mini html for an empty string throwing an error.
[msom]

0.3.3 (2018-01-18)
~~~~~~~~~~~~~~~~~~~~~

Expand Down
3 changes: 3 additions & 0 deletions onegov/pdf/pdf.py
Expand Up @@ -320,6 +320,9 @@ def mini_html(self, html):
"""

if not html:
return

def strip(text):
text = text.strip('\r\n')
prefix = ' ' if text.startswith(' ') else ''
Expand Down

0 comments on commit 3f53c49

Please sign in to comment.