aboutsummaryrefslogtreecommitdiff
path: root/mammoth/styles/parser/token_iterator.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-11-24 22:01:35 +0000
committerMichael Williamson <mike@zwobble.org>2016-11-24 22:01:58 +0000
commit507700470b46329ea8b1f8191e48fa69a24a8deb (patch)
tree035d5c2dcd4560a81067a4b9a7ff28762f06d3c4 /mammoth/styles/parser/token_iterator.py
parent7e3ef0ebd0c3453ce351af70ccdb25e93de1d7a9 (diff)
Add style mapping parser
Diffstat (limited to 'mammoth/styles/parser/token_iterator.py')
-rw-r--r--mammoth/styles/parser/token_iterator.py4
1 files changed, 2 insertions, 2 deletions
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: