aboutsummaryrefslogtreecommitdiff
path: root/mammoth/style_reader
diff options
context:
space:
mode:
Diffstat (limited to 'mammoth/style_reader')
-rw-r--r--mammoth/style_reader/document_matcher_reader.py6
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 66f5d19..b22b6a0 100644
--- a/mammoth/style_reader/document_matcher_reader.py
+++ b/mammoth/style_reader/document_matcher_reader.py
@@ -22,6 +22,8 @@ def read_document_matcher_node(root_node):
return document_matchers.underline
elif element_node.expr_name == "strikethrough":
return document_matchers.strikethrough
+ elif element_node.expr_name == "comment_reference":
+ return document_matchers.comment_reference
def _read_paragraph_node(paragraph_node):
@@ -61,7 +63,7 @@ def _read_list_node(list_node):
return None
grammar_text = r"""
-document_matcher = paragraph / run / underline / strikethrough / bold / italic
+document_matcher = paragraph / run / underline / strikethrough / bold / italic / comment_reference
underline = "u"
@@ -71,6 +73,8 @@ bold = "b"
italic = "i"
+comment_reference = "comment-reference"
+
paragraph = "p" style_id? style_name_specifier? list?
run = "r" style_id? style_name_specifier?