wikiparser: Don't render Admonition with style comment

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
James Valleroy 2020-08-28 12:13:28 -04:00
parent bf2518bd0d
commit ce642e3e87
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -477,6 +477,9 @@ class Admonition(Element):
return super().__repr__(self.style, self.content)
def to_docbook(self, context=None):
if self.style == 'comment':
return ''
xml = '<' + self.style + '>'
item_xml = [item.to_docbook(context) for item in self.content]
xml += ' '.join(item_xml) + '</' + self.style + '>'