Skip to content

Commit

Permalink
bump parser to ensure compatibility awareness
Browse files Browse the repository at this point in the history
  • Loading branch information
RonnyPfannschmidt committed Jan 10, 2021
1 parent 1cc4a69 commit 45f1301
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions zim/formats/wiki.py
Expand Up @@ -19,9 +19,10 @@
old_url_re = old_url_re.p


WIKI_FORMAT_VERSION = 'zim 0.6'
WIKI_FORMAT_VERSION = 'zim 0.7'
assert WIKI_FORMAT_VERSION != 'zim 0.26' # skip number for historic reasons
# History:
# - 0.7 support backarrow bullet
# - 0.6 new url parsing logic
# - 0.5 support nested formatting
# - 0.4 parser rewrite, specifically changed parsing indented blocks
Expand Down Expand Up @@ -629,7 +630,7 @@ def parse(self, input, partial=False, file_input=False):

# Support backward compatibility - see history notes WIKI_FORMAT_VERSION
version = version or self.version
if version == 'zim 0.6':
if version in ('zim 0.6', 'zim 0.7'):
mywikiparser = wikiparser
elif version in ('zim 0.4', 'zim 0.5'):
mywikiparser = WikiParser(backward_url_parsing=True)
Expand Down

0 comments on commit 45f1301

Please sign in to comment.