aboutsummaryrefslogtreecommitdiff
path: root/wiki2text.py
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2015-07-15 08:13:44 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2015-07-15 10:09:36 +0300
commitf97542b428b1a008e2df955cf2047e4b6b9d73d3 (patch)
tree58fd02b5f62f7b08b21fa2749c9ae5a3a693eaa2 /wiki2text.py
parent4097896542f2279700794104c7c0728beed38cd0 (diff)
downloadwit-f97542b428b1a008e2df955cf2047e4b6b9d73d3.tar.gz
wit-f97542b428b1a008e2df955cf2047e4b6b9d73d3.tar.bz2
Fix parsing of <nowiki> blocks.
* wikimarkup.py (tokread): Catch the </nowiki> tag appearing on the same line with the opening <nowiki>. Never return nowiki block as a tag, instead yield a sequence of TEXT nodes. * wiki2html.py (str_tag): Update. * wiki2texi.py: Likewise. * wiki2text.py: Likewise.
Diffstat (limited to 'wiki2text.py')
-rw-r--r--wiki2text.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/wiki2text.py b/wiki2text.py
index d4cab81..c92dbc0 100644
--- a/wiki2text.py
+++ b/wiki2text.py
@@ -143,9 +143,7 @@ class TextWikiMarkup (WikiMarkup):
return output + linebuf
def str_tag(self, elt):
- if elt['tag'] == 'nowiki':
- return self.format(elt['content'])
- elif elt['tag'] == 'code':
+ if elt['tag'] == 'code':
self.nested += 1
s = self.format(elt['content'])
self.nested -= 1

Return to:

Send suggestions and report system problems to the System administrator.