summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wiki2html.py2
-rw-r--r--wikimarkup.py9
2 files changed, 5 insertions, 6 deletions
diff --git a/wiki2html.py b/wiki2html.py
index 4e0e78a..6fa0ae3 100644
--- a/wiki2html.py
+++ b/wiki2html.py
@@ -157,14 +157,12 @@ class HtmlWikiMarkup (WikiMarkup):
return s
def __str__(self):
self.state = [ self.ST_PARA ]
return WikiMarkup.__str__(self) + self.cpara()
-
-
class HtmlWiktionaryMarkup (HtmlWikiMarkup):
"""
A class for translating Wiktionary articles into HTML.
This version does not do much, except that it tries to correctly
format templates. But "tries" does not mean "does". The heuristics
used here is clearly not enough to cope with it.
diff --git a/wikimarkup.py b/wikimarkup.py
index 7a7125e..8ed5c46 100644
--- a/wikimarkup.py
+++ b/wikimarkup.py
@@ -211,26 +211,27 @@ It handles:
(self.SEQ, self.getkn(text)))
pos = i + 1
elif m.group(0) == "'''":
e = boend.search(line, m.end(0))
if e:
i = e.start(0)
- pos = e.end(0)
+ pos = i + 3
else:
pos = len(line)
i = pos
yield(self.BOLD,
(self.SEQ, self.getkn(line[m.end(0):i])))
- pos = e.end(0)
elif m.group(0) == "''":
i = self.itend(line, m.end(0))
if i == -1:
- i = len(line)
+ pos = len(line)
+ i = pos
+ else:
+ pos = i + 2
yield(self.IT,
(self.SEQ, self.getkn(line[m.end(0):i])))
- pos = i + 2
def input(self):
return None
def expandtok(self, tok):
if type(tok) == GeneratorType:

Return to:

Send suggestions and report system problems to the System administrator.