diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-06-17 15:54:29 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-06-17 15:54:29 +0100 |
| commit | cd2a10d64f6f2a1a42c1a3f0c144a3a521083cd8 (patch) | |
| tree | a251f341d5181ef347636e4d5ab3657782d8367b /mammoth/style_reader/document_matcher_reader.py | |
| parent | 3bfa77d64e69d20609c8321a067bfa2651a7eabc (diff) | |
Allow strikethrough to be configured in style mapping
Diffstat (limited to 'mammoth/style_reader/document_matcher_reader.py')
| -rw-r--r-- | mammoth/style_reader/document_matcher_reader.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mammoth/style_reader/document_matcher_reader.py b/mammoth/style_reader/document_matcher_reader.py index 56c4626..04a26c0 100644 --- a/mammoth/style_reader/document_matcher_reader.py +++ b/mammoth/style_reader/document_matcher_reader.py @@ -16,6 +16,8 @@ def read_document_matcher_node(root_node): return _read_run_node(element_node) elif element_node.expr_name == "underline": return document_matchers.underline + elif element_node.expr_name == "strikethrough": + return document_matchers.strikethrough def _read_paragraph_node(paragraph_node): @@ -55,10 +57,12 @@ def _read_list_node(list_node): return None grammar_text = r""" -document_matcher = paragraph / run / underline +document_matcher = paragraph / run / underline / strikethrough underline = "u" +strikethrough = "strike" + paragraph = "p" style_id? style_name_specifier? list? run = "r" style_id? style_name_specifier? |
