to-wiki/wikiconv2.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
New commits: commit 2fe3e715144881d57cce1d8aac7e0ca9c72c9bc8 Author: Andras Timar <ati...@suse.com> Date: Fri Nov 30 22:56:10 2012 +0100 tweaks in order to parse LibreLogo help (not perfect) Change-Id: I4e75d485ad5f663b9ed68f3504a43280ba56b965 diff --git a/to-wiki/wikiconv2.py b/to-wiki/wikiconv2.py index 3e0e159..5b68912 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': _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits