diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2015-07-07 16:19:56 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2015-07-07 16:19:56 +0300 |
commit | 323ba4ba7d144f3da5cf70ad64b3366eebca5f20 (patch) | |
tree | 922fc74662a809ecf4a416e5570dc3d6e7994492 /wiki2html.py | |
parent | edd43da79765b81d3f1b51c8d132196cb1429fff (diff) | |
download | wit-323ba4ba7d144f3da5cf70ad64b3366eebca5f20.tar.gz wit-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')
-rw-r--r-- | wiki2html.py | 5 |
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): |