diff --git a/docxtpl/__init__.py b/docxtpl/__init__.py index 6658e6b..a3ab3c7 100644 --- a/docxtpl/__init__.py +++ b/docxtpl/__init__.py @@ -7,7 +7,7 @@ Created : 2015-03-12 import functools import io -__version__ = '0.10.1' +__version__ = '0.10.2' from lxml import etree from docx import Document @@ -714,7 +714,7 @@ class RichText(object): if italic: prop += u'' if underline: - if underline not in ['single', 'double']: + if underline not in ['single', 'double', 'thick', 'dotted', 'dash', 'dotDash', 'dotDotDash', 'wave']: underline = 'single' prop += u'' % underline if strike: diff --git a/tests/richtext.py b/tests/richtext.py index 81f7c0f..5304abb 100644 --- a/tests/richtext.py +++ b/tests/richtext.py @@ -29,6 +29,9 @@ rt.add('\n1st line') rt.add('\n2nd line') rt.add('\n3rd line') rt.add('\n\n') + +for ul in ['single', 'double', 'thick', 'dotted', 'dash', 'dotDash', 'dotDotDash', 'wave']: + rt.add('\nUnderline : ' + ul + ' \n', underline=ul) rt.add('\nFonts :\n', underline=True) rt.add('Arial\n', font='Arial') rt.add('Courier New\n', font='Courier New')