diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-11-29 15:30:17 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-11-29 15:30:17 +0200 |
commit | 566d990c8507622daced29cf10cb2e1e30aad5bd (patch) | |
tree | 85286512d21627a017a4847f7b8ec7e22f4c651f | |
parent | e3710f6c32aa9a9e6b737c4ebc64af0df2ea872b (diff) | |
download | wikitrans-566d990c8507622daced29cf10cb2e1e30aad5bd.tar.gz wikitrans-566d990c8507622daced29cf10cb2e1e30aad5bd.tar.bz2 |
Remove images from text output, unless references is true
-rw-r--r-- | wiki2text.py | 2 |
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) |