From 941ea90fe952f7f2b195aada2e39d0482261e1fe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 4 Jan 2022 20:00:56 +0100 Subject: [PATCH] m.htmlsanity: don't rely on .m-transition, again. Followup to 3f7b8501c98bfead4047f397a527e096ac75e26a. Was fixed in one place but not in the other. Also add a clarifying comment. --- plugins/m/htmlsanity.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/m/htmlsanity.py b/plugins/m/htmlsanity.py index 049cbc72..554a495c 100644 --- a/plugins/m/htmlsanity.py +++ b/plugins/m/htmlsanity.py @@ -632,7 +632,8 @@ class SaneHtmlTranslator(HTMLTranslator): def depart_definition_list(self, node): self.body.append('\n') - # no class="docutils" in
+ # no class="docutils" in
; if it's m.css .. transition:: directive + # (having children), put it in a

instead def visit_transition(self, node): if len(node.children) > 0: self.body.append(self.starttag(node, 'p', '')) @@ -640,7 +641,7 @@ class SaneHtmlTranslator(HTMLTranslator): self.body.append(self.emptytag(node, 'hr')) def depart_transition(self, node): - if 'm-transition' in node['classes']: + if len(node.children) > 0: self.body.append('

\n') class _SaneFieldBodyTranslator(SaneHtmlTranslator): -- 2.30.2