summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2008-11-29 13:30:17 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2008-11-29 13:30:17 (GMT)
commit566d990c8507622daced29cf10cb2e1e30aad5bd (patch) (side-by-side diff)
tree85286512d21627a017a4847f7b8ec7e22f4c651f
parente3710f6c32aa9a9e6b737c4ebc64af0df2ea872b (diff)
downloadwikitrans-566d990c8507622daced29cf10cb2e1e30aad5bd.tar.gz
wikitrans-566d990c8507622daced29cf10cb2e1e30aad5bd.tar.bz2
Remove images from text output, unless references is true
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--wiki2text.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/wiki2text.py b/wiki2text.py
index 564809f..f28c343 100644
--- a/wiki2text.py
+++ b/wiki2text.py
@@ -71,6 +71,8 @@ class TextWikiMarkup (WikiMarkup):
ns = self.wiki_ns_name(qual)
if ns:
if ns == 'NS_IMAGE':
+ if not self.references:
+ return None
text = "[%s: %s]" % (qual, text if text else arg)
tgt = self.image_base + '/' + \
urllib.quote(tgt) + \

Return to:

Send suggestions and report system problems to the System administrator.