summaryrefslogtreecommitdiffabout
path: root/wiki2html.py
authorSergey Poznyakoff <gray@gnu.org.ua>2015-07-07 13:19:56 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2015-07-07 13:19:56 (GMT)
commit323ba4ba7d144f3da5cf70ad64b3366eebca5f20 (patch) (side-by-side diff)
tree922fc74662a809ecf4a416e5570dc3d6e7994492 /wiki2html.py
parentedd43da79765b81d3f1b51c8d132196cb1429fff (diff)
downloadwikitrans-323ba4ba7d144f3da5cf70ad64b3366eebca5f20.tar.gz
wikitrans-323ba4ba7d144f3da5cf70ad64b3366eebca5f20.tar.bz2
Initial implementation of Texinfo translator class
* wiki2html.py (str_pre): Don't add <pre> tags if nested * wiki2texi.py: New file. * wikicvt.py: Add --type (--to, -t) and --input-type (-I) options. * wikimarkup.py (BaseWikiMarkup): Use new object style. (tokread): Remove 'extra' keyword for the sake of parse_env
Diffstat (limited to 'wiki2html.py') (more/less context) (ignore whitespace changes)
-rw-r--r--wiki2html.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/wiki2html.py b/wiki2html.py
index d9c049c..f8dfb63 100644
--- a/wiki2html.py
+++ b/wiki2html.py
@@ -99,7 +99,8 @@ class HtmlWikiMarkup (WikiMarkup):
elif s[0] == "proto":
text = self.tmpl_proto(s)
return text
-
+
+ print arg
(qual,sep,tgt) = arg.partition(':')
if tgt != '':
ns = self.wiki_ns_name(qual)
@@ -202,6 +203,8 @@ class HtmlWikiMarkup (WikiMarkup):
string = "";
for x in elt['content']:
string += self.format(x)
+ if self.nested:
+ return string
return '<pre>' + string + '</pre>'
def str_ind(self, elt):

Return to:

Send suggestions and report system problems to the System administrator.