summaryrefslogtreecommitdiff
path: root/WikiTrans/wiki2text.py
diff options
context:
space:
mode:
Diffstat (limited to 'WikiTrans/wiki2text.py')
-rw-r--r--WikiTrans/wiki2text.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/WikiTrans/wiki2text.py b/WikiTrans/wiki2text.py
index dc2e003..cb3a183 100644
--- a/WikiTrans/wiki2text.py
+++ b/WikiTrans/wiki2text.py
@@ -104,7 +104,7 @@ class TextLinkNode(WikiSeqNode):
ns = self.parser.wiki_ns_name(qual)
if ns:
if ns == 'NS_IMAGE':
- if not self.parser.showrefs:
+ if not self.parser.show_urls:
return ""
text = "[%s: %s]" % (qual, text if text else arg)
tgt = self.image_base + '/' + \
@@ -121,7 +121,7 @@ class TextLinkNode(WikiSeqNode):
tgt = self.parser.mktgt(tgt)
else:
tgt = self.parser.mktgt(arg)
- if self.parser.showrefs:
+ if self.parser.show_urls:
return "%s (see %s) " % (text, tgt)
elif not text or text == '':
return arg
@@ -212,7 +212,7 @@ class TextWikiMarkup (WikiMarkup):
# Output width
width = 78
# Do not show references.
- showrefs = False
+ show_urls = False
# Provide a minimum markup
markup = True
@@ -226,10 +226,8 @@ class TextWikiMarkup (WikiMarkup):
super(TextWikiMarkup,self).__init__(*args, **keywords)
if 'width' in keywords:
self.width = keywords['width']
- if 'refs' in keywords:
- self.showrefs = keywords['refs']
- if 'markup' in keywords:
- self.markup = keywords['markup']
+ if 'show_urls' in keywords:
+ self.show_urls = keywords['show_urls']
self.token_class['SEQ'] = TextSeqNode
self.token_class['TEXT'] = TextTextNode
self.token_class['PRE'] = TextPreNode

Return to:

Send suggestions and report system problems to the System administrator.