summaryrefslogtreecommitdiff
path: root/to-wiki
diff options
context:
space:
mode:
authorAndras Timar <atimar@suse.com>2012-11-30 22:56:10 +0100
committerAndras Timar <atimar@suse.com>2012-11-30 22:56:10 +0100
commit2fe3e715144881d57cce1d8aac7e0ca9c72c9bc8 (patch)
treeb1bea26de266f8c4374bd99e6fb67f83f2359953 /to-wiki
parentb91788bdfe56875a9342d011439f954e50d9c751 (diff)
tweaks in order to parse LibreLogo help (not perfect)
Change-Id: I4e75d485ad5f663b9ed68f3504a43280ba56b965
Diffstat (limited to 'to-wiki')
-rwxr-xr-xto-wiki/wikiconv2.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/to-wiki/wikiconv2.py b/to-wiki/wikiconv2.py
index 3e0e159b5f..5b68912c0c 100755
--- a/to-wiki/wikiconv2.py
+++ b/to-wiki/wikiconv2.py
@@ -36,6 +36,7 @@ replace_paragraph_role = \
'head1': '= ', # used only in one file, probably in error?
'head2': '== ', # used only in one file, probably in error?
'listitem': '',
+ 'logocode': '<code>',
'note': '{{Note|',
'null': '', # special paragraph for Variable, CaseInline, etc.
'paragraph': '',
@@ -65,6 +66,7 @@ replace_paragraph_role = \
'head1': ' =\n\n', # used only in one file, probably in error?
'head2': ' ==\n\n', # used only in one file, probably in error?
'listitem': '',
+ 'logocode': '</code>\n\n',
'note': '}}\n\n',
'null': '', # special paragraph for Variable, CaseInline, etc.
'paragraph': '\n\n',
@@ -94,6 +96,7 @@ replace_paragraph_role = \
'head1': False,
'head2': False,
'listitem': False,
+ 'logocode': False,
'note': True,
'null': False,
'paragraph': False,
@@ -571,6 +574,8 @@ class ListItem(ElementBase):
self.embed_href(parser, fname, id)
elif name == 'paragraph':
parser.parse_localized_paragraph(ListItemParagraph(attrs, self), attrs, self)
+ elif name == 'list':
+ self.parse_child(List(attrs, self))
else:
self.unhandled_element(parser, name)
@@ -1051,7 +1056,7 @@ class Paragraph(ElementBase):
# the text itself
children = ElementBase.get_all(self)
- if self.role != 'emph' and self.role != 'bascode':
+ if self.role != 'emph' and self.role != 'bascode' and self.role != 'logocode':
children = children.strip()
if len(children) == 0:
@@ -1143,6 +1148,8 @@ class TableContentParagraph(Paragraph):
self.role = 'tablecontentcode'
elif self.role == 'bascode':
self.role = 'tablecontentcode'
+ elif self.role == 'logocode':
+ self.role = 'tablecontentcode'
else:
self.role = 'tablecontent'
if self.role == 'tablehead':