1.1 --- a/moinformat/serialisers/html/moin.py Thu May 30 23:27:26 2019 +0200
1.2 +++ b/moinformat/serialisers/html/moin.py Thu May 30 23:32:27 2019 +0200
1.3 @@ -147,8 +147,9 @@
1.4 def end_listitem(self, indent, marker, space, num):
1.5 self.out("</li>")
1.6
1.7 - def start_macro(self, name, args, nodes):
1.8 - self.out("<span class='macro'>")
1.9 + def start_macro(self, name, args, nodes, inline):
1.10 + tag = inline and "span" or "div"
1.11 + self.out("<%s class='macro %s'>" % (tag, escape_text(name)))
1.12
1.13 # Fallback case for when macros are not replaced.
1.14
1.15 @@ -167,8 +168,9 @@
1.16 self.out(")")
1.17 self.out(escape_text(">>"))
1.18
1.19 - def end_macro(self):
1.20 - self.out("</span>")
1.21 + def end_macro(self, inline):
1.22 + tag = inline and "span" or "div"
1.23 + self.out("</%s>" % tag)
1.24
1.25 def start_monospace(self):
1.26 self.out("<tt>")