summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2008-11-29 15:30:17 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2008-11-29 15:30:17 +0200
commit566d990c8507622daced29cf10cb2e1e30aad5bd (patch)
tree85286512d21627a017a4847f7b8ec7e22f4c651f
parente3710f6c32aa9a9e6b737c4ebc64af0df2ea872b (diff)
downloadwikitrans-566d990c8507622daced29cf10cb2e1e30aad5bd.tar.gz
wikitrans-566d990c8507622daced29cf10cb2e1e30aad5bd.tar.bz2
Remove images from text output, unless references is true
-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
@@ -73,2 +73,4 @@ class TextWikiMarkup (WikiMarkup):
if ns == 'NS_IMAGE':
+ if not self.references:
+ return None
text = "[%s: %s]" % (qual, text if text else arg)

Return to:

Send suggestions and report system problems to the System administrator.