summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.txt2
-rwxr-xr-xbin/wikitrans2
-rw-r--r--setup.py2
-rw-r--r--wikitrans/wiki2html.py6
-rw-r--r--wikitrans/wikimarkup.py2
5 files changed, 8 insertions, 6 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index aa894f9..ebebda8 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,5 @@
+v1.3, 2018-09-01 -- Don't throw exception on invalid tokens.
+ Fix python 3 compatibility
v1.2, 2018-08-27 -- Fix handling of unrecognized closing tags.
v1.1, 2018-08-24 -- Initialize token_class dynamically.
v1.0, 2018-08-19 -- Initial release.
diff --git a/bin/wikitrans b/bin/wikitrans
index 09ba0b3..01c3f9c 100755
--- a/bin/wikitrans
+++ b/bin/wikitrans
@@ -105,7 +105,7 @@ def getwiki(url, options):
def main():
usage = '%prog [OPTIONS] ARG'
- version = '%prog 1.2'
+ version = '%prog 1.3'
description = """Translates MediaWiki documents markup to various other formats.
If ARG looks like a URL, the wiki text to be converted will be downloaded
from that URL.
diff --git a/setup.py b/setup.py
index d1e10e7..d5d59d0 100644
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,7 @@ with open("README.rst", "r") as fh:
long_description = fh.read()
setup(name='wikitrans',
- version='1.2',
+ version='1.3',
author='Sergey Poznyakoff',
author_email='gray@gnu.org',
url='http://www.gnu.org.ua/projects/wikitrans',
diff --git a/wikitrans/wiki2html.py b/wikitrans/wiki2html.py
index 0696dce..affe10b 100644
--- a/wikitrans/wiki2html.py
+++ b/wikitrans/wiki2html.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
-# Copyright (C) 2008-2018 Sergey Poznyakoff
+# Copyright (C) 2008-2021 Sergey Poznyakoff
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -177,9 +177,9 @@ class HtmlTagNode(WikiTagNode):
+ '<b><a href="#cite_ref-%d">^</a></b>'
+ '</span>'
+ '<span class="reference-text">'
- + ref.content.format()
+ + '%s'
+ '</span>'
- + '</li>\n') % (n, n)
+ + '</li>\n') % (n, n, ref.content.format())
s += '</ol>\n</div>\n'
return s
else:
diff --git a/wikitrans/wikimarkup.py b/wikitrans/wikimarkup.py
index 1e2429f..6660808 100644
--- a/wikitrans/wikimarkup.py
+++ b/wikitrans/wikimarkup.py
@@ -659,7 +659,7 @@ class WikiMarkupParser(object):
self.dprint(80, "LEAVE parse_ref=None")
return None
elif tok.type == 'OTAG':
- list.append(self.parse_tag(tok))
+ seq.append(self.parse_tag(tok))
else:
seq.append(tok)

Return to:

Send suggestions and report system problems to the System administrator.