From 507700470b46329ea8b1f8191e48fa69a24a8deb Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Thu, 24 Nov 2016 22:01:35 +0000 Subject: Add style mapping parser --- mammoth/styles/parser/token_iterator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mammoth/styles/parser/token_iterator.py') diff --git a/mammoth/styles/parser/token_iterator.py b/mammoth/styles/parser/token_iterator.py index c6876e9..114ce28 100644 --- a/mammoth/styles/parser/token_iterator.py +++ b/mammoth/styles/parser/token_iterator.py @@ -27,9 +27,9 @@ class TokenIterator(object): else: raise self._unexpected_token_type(token_type, token) - def try_skip(self, token_type, token_value): + def try_skip(self, token_type, token_value=None): token = self._tokens[self._index] - if token.type == token_type and token.value == token_value: + if token.type == token_type and (token_value is None or token.value == token_value): self._index += 1 return True else: -- cgit v1.2.3