aboutsummaryrefslogtreecommitdiff
path: root/wiki2texi.py
diff options
context:
space:
mode:
Diffstat (limited to 'wiki2texi.py')
-rw-r--r--wiki2texi.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/wiki2texi.py b/wiki2texi.py
index a7b5e92..6e32c56 100644
--- a/wiki2texi.py
+++ b/wiki2texi.py
@@ -13,13 +13,12 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from wikimarkup import *
-from types import TupleType
from wikins import wiki_ns_re, wiki_ns
import re
import urllib
class TexiWikiMarkup (WikiMarkup):
sectcomm = {
@@ -55,19 +54,19 @@ class TexiWikiMarkup (WikiMarkup):
sectioning_model = 'numbered'
sectioning_start = 0
def __init__(self, *args, **keywords):
super(TexiWikiMarkup, self).__init__(*args, **keywords)
- if keywords.has_key("sectioning-model"):
+ if "sectioning-model" in keywords:
val = keywords["sectioning-model"]
- if self.sectcomm.has_key(val):
+ if val in self.sectcomm:
self.sectioning_model = val
else:
raise ValueError("Invalid value for sectioning model: %s" % val)
- if keywords.has_key("sectioning-start"):
+ if "sectioning-start" in keywords:
val = keywords["sectioning-start"]
if val < 0 or val > 4:
raise ValueError("Invalid value for sectioning start: %s" % val)
else:
self.sectioning_start = val
@@ -214,13 +213,13 @@ class TexiWikiMarkup (WikiMarkup):
return string
def str_link(self, elt):
# FIXME: A very crude version
arg = self.format(elt['content'][0])
if len(elt['content']) > 1:
- s = map(self.format, elt['content'])
+ s = [x for x in map(self.format, elt['content'])]
text = s[1]
else:
s = None
text = None
if s:

Return to:

Send suggestions and report system problems to the System administrator.