diff options
| author | Michael Williamson <mike@zwobble.org> | 2014-01-07 22:42:42 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-01-07 22:42:42 +0000 |
| commit | 629ce26f2b09bc4e93448d2c4f7a4cacb222f369 (patch) | |
| tree | ab169bd0c84c5e3db21b673e01a9880aedd0075f /mammoth/__init__.py | |
| parent | 214689b8eb45302a0adea8006fb95b58156fb27e (diff) | |
Rename styles to style map for clarity
Diffstat (limited to 'mammoth/__init__.py')
| -rw-r--r-- | mammoth/__init__.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mammoth/__init__.py b/mammoth/__init__.py index 65b8821..3c726d6 100644 --- a/mammoth/__init__.py +++ b/mammoth/__init__.py @@ -2,16 +2,16 @@ from .results import Result from . import docx, conversion, style_reader, lists -def convert_to_html(fileobj, styles=None, convert_image=None): - if styles is None: - styles = _default_styles +def convert_to_html(fileobj, style_map=None, convert_image=None): + if style_map is None: + style_map = _default_styles return docx.read(fileobj).bind(lambda document: - conversion.convert_document_element_to_html(document, styles=_read_styles(styles), convert_image=convert_image) + conversion.convert_document_element_to_html(document, styles=_read_style_map(style_map), convert_image=convert_image) ) -def _read_styles(style_text): +def _read_style_map(style_text): lines = filter(None, map(lambda line: line.strip(), style_text.split("\n"))) return lists.map(style_reader.read_style, lines) |
