diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-11-29 21:54:31 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-11-29 21:54:31 +0000 |
| commit | 5bc676b074a651a70b3b259182a94120c036d74a (patch) | |
| tree | 5a7a46be69566f3472c4ca841983b7d6c6d60b4f /mammoth/styles/parser/document_matcher_parser.py | |
| parent | 95394c062b971179a7fda954771bdb6390ba88b7 (diff) | |
Raise error on unrecognised string matcher
Diffstat (limited to 'mammoth/styles/parser/document_matcher_parser.py')
| -rw-r--r-- | mammoth/styles/parser/document_matcher_parser.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mammoth/styles/parser/document_matcher_parser.py b/mammoth/styles/parser/document_matcher_parser.py index 0024ac8..7f117b7 100644 --- a/mammoth/styles/parser/document_matcher_parser.py +++ b/mammoth/styles/parser/document_matcher_parser.py @@ -59,8 +59,7 @@ def _parse_string_matcher(tokens): elif tokens.try_skip(TokenType.SYMBOL, "^="): return document_matchers.starts_with(parse_string(tokens)) else: - # TODO raise - pass + raise LineParseError("Unrecognised string matcher: {0}".format(tokens.next_value())) def _parse_numbering(tokens): if tokens.try_skip(TokenType.SYMBOL, ":"): |
