2.1 --- a/moinformat/tree/moin.py Thu Aug 17 22:50:30 2023 +0200
2.2 +++ b/moinformat/tree/moin.py Thu Aug 17 23:33:18 2023 +0200
2.3 @@ -206,7 +206,7 @@
2.4 self.indent, self.type, self.args, self.transparent, self.extra)
2.5
2.6 def visit(self, visitor):
2.7 - visitor.region(self)
2.8 + return visitor.region(self)
2.9
2.10
2.11
2.12 @@ -220,7 +220,7 @@
2.13 return "Block(%r)" % self.nodes
2.14
2.15 def visit(self, visitor):
2.16 - visitor.block(self)
2.17 + return visitor.block(self)
2.18
2.19 class DefItem(Container):
2.20
2.21 @@ -235,7 +235,7 @@
2.22 return "DefItem(%r, %r, %r)" % (self.nodes, self.pad, self.extra)
2.23
2.24 def visit(self, visitor):
2.25 - visitor.defitem(self)
2.26 + return visitor.defitem(self)
2.27
2.28 class DefTerm(Container):
2.29
2.30 @@ -250,7 +250,7 @@
2.31 return "DefTerm(%r, %r, %r)" % (self.nodes, self.pad, self.extra)
2.32
2.33 def visit(self, visitor):
2.34 - visitor.defterm(self)
2.35 + return visitor.defterm(self)
2.36
2.37 class FontStyle(Container):
2.38
2.39 @@ -279,7 +279,7 @@
2.40 return "FontStyle(%r, %r, %r)" % (self.nodes, self.emphasis, self.strong)
2.41
2.42 def visit(self, visitor):
2.43 - visitor.fontstyle(self)
2.44 + return visitor.fontstyle(self)
2.45
2.46 class Heading(Container):
2.47
2.48 @@ -301,7 +301,7 @@
2.49 self.end_pad, self.end_extra, self.identifier)
2.50
2.51 def visit(self, visitor):
2.52 - visitor.heading(self)
2.53 + return visitor.heading(self)
2.54
2.55 class LinkLabel(Container):
2.56
2.57 @@ -311,7 +311,7 @@
2.58 return "LinkLabel(%r)" % self.nodes
2.59
2.60 def visit(self, visitor):
2.61 - visitor.link_label(self)
2.62 + return visitor.link_label(self)
2.63
2.64 class LinkParameter(Container):
2.65
2.66 @@ -321,7 +321,7 @@
2.67 return "LinkParameter(%r)" % self.nodes
2.68
2.69 def visit(self, visitor):
2.70 - visitor.link_parameter(self)
2.71 + return visitor.link_parameter(self)
2.72
2.73 class List(Container):
2.74
2.75 @@ -343,7 +343,7 @@
2.76 def visit(self, visitor):
2.77 if not self.first:
2.78 self.init()
2.79 - visitor.list(self)
2.80 + return visitor.list(self)
2.81
2.82 class ListItem(Container):
2.83
2.84 @@ -364,7 +364,7 @@
2.85 return "ListItem(%r, %r, %r, %r, %r)" % (self.nodes, self.indent, self.marker, self.space, self.num)
2.86
2.87 def visit(self, visitor):
2.88 - visitor.listitem(self)
2.89 + return visitor.listitem(self)
2.90
2.91 class Table(Container):
2.92
2.93 @@ -374,7 +374,7 @@
2.94 return "Table(%r)" % self.nodes
2.95
2.96 def visit(self, visitor):
2.97 - visitor.table(self)
2.98 + return visitor.table(self)
2.99
2.100 class TableAttrs(Container):
2.101
2.102 @@ -393,7 +393,7 @@
2.103 return "TableAttrs(%r)" % self.nodes
2.104
2.105 def visit(self, visitor):
2.106 - visitor.table_attrs(self)
2.107 + return visitor.table_attrs(self)
2.108
2.109 class TableCell(Container):
2.110
2.111 @@ -410,7 +410,7 @@
2.112 self.leading, self.padding)
2.113
2.114 def visit(self, visitor):
2.115 - visitor.table_cell(self)
2.116 + return visitor.table_cell(self)
2.117
2.118 class TableRow(Container):
2.119
2.120 @@ -427,7 +427,7 @@
2.121 self.leading, self.padding)
2.122
2.123 def visit(self, visitor):
2.124 - visitor.table_row(self)
2.125 + return visitor.table_row(self)
2.126
2.127
2.128
2.129 @@ -445,7 +445,7 @@
2.130 "Larger text."
2.131
2.132 def visit(self, visitor):
2.133 - visitor.larger(self)
2.134 + return visitor.larger(self)
2.135
2.136 class Link(Container):
2.137
2.138 @@ -459,7 +459,7 @@
2.139 return "Link(%r, %r)" % (self.nodes, self.target)
2.140
2.141 def visit(self, visitor):
2.142 - visitor.link(self)
2.143 + return visitor.link(self)
2.144
2.145 class Macro(Container):
2.146
2.147 @@ -479,42 +479,42 @@
2.148 self.nodes, self.inline)
2.149
2.150 def visit(self, visitor):
2.151 - visitor.macro(self)
2.152 + return visitor.macro(self)
2.153
2.154 class Monospace(Inline):
2.155
2.156 "Monospaced text."
2.157
2.158 def visit(self, visitor):
2.159 - visitor.monospace(self)
2.160 + return visitor.monospace(self)
2.161
2.162 class Smaller(Inline):
2.163
2.164 "Smaller text."
2.165
2.166 def visit(self, visitor):
2.167 - visitor.smaller(self)
2.168 + return visitor.smaller(self)
2.169
2.170 class Strikethrough(Inline):
2.171
2.172 "Crossed-visitor text."
2.173
2.174 def visit(self, visitor):
2.175 - visitor.strikethrough(self)
2.176 + return visitor.strikethrough(self)
2.177
2.178 class Subscript(Inline):
2.179
2.180 "Subscripted text."
2.181
2.182 def visit(self, visitor):
2.183 - visitor.subscript(self)
2.184 + return visitor.subscript(self)
2.185
2.186 class Superscript(Inline):
2.187
2.188 "Superscripted text."
2.189
2.190 def visit(self, visitor):
2.191 - visitor.superscript(self)
2.192 + return visitor.superscript(self)
2.193
2.194 class Transclusion(Container):
2.195
2.196 @@ -528,14 +528,14 @@
2.197 return "Transclusion(%r, %r)" % (self.nodes, self.target)
2.198
2.199 def visit(self, visitor):
2.200 - visitor.transclusion(self)
2.201 + return visitor.transclusion(self)
2.202
2.203 class Underline(Inline):
2.204
2.205 "Underlined text."
2.206
2.207 def visit(self, visitor):
2.208 - visitor.underline(self)
2.209 + return visitor.underline(self)
2.210
2.211
2.212
2.213 @@ -559,7 +559,7 @@
2.214 return "Anchor(%r)" % self.target
2.215
2.216 def visit(self, visitor):
2.217 - visitor.anchor(self)
2.218 + return visitor.anchor(self)
2.219
2.220 class Break(Node):
2.221
2.222 @@ -569,7 +569,7 @@
2.223 return "Break()"
2.224
2.225 def visit(self, visitor):
2.226 - visitor.break_(self)
2.227 + return visitor.break_(self)
2.228
2.229 class Comment(Node):
2.230
2.231 @@ -583,7 +583,7 @@
2.232 return "Comment(%r, %r)" % (self.comment, self.extra)
2.233
2.234 def visit(self, visitor):
2.235 - visitor.comment(self)
2.236 + return visitor.comment(self)
2.237
2.238 class Directive(Node):
2.239
2.240 @@ -597,7 +597,7 @@
2.241 return "Directive(%r, %r)" % (self.directive, self.extra)
2.242
2.243 def visit(self, visitor):
2.244 - visitor.directive(self)
2.245 + return visitor.directive(self)
2.246
2.247 class LineBreak(Node):
2.248
2.249 @@ -607,7 +607,7 @@
2.250 return "LineBreak()"
2.251
2.252 def visit(self, visitor):
2.253 - visitor.linebreak(self)
2.254 + return visitor.linebreak(self)
2.255
2.256 class NonBreakingSpace(Node):
2.257
2.258 @@ -617,7 +617,7 @@
2.259 return "NonBreakingSpace()"
2.260
2.261 def visit(self, visitor):
2.262 - visitor.nbsp(self)
2.263 + return visitor.nbsp(self)
2.264
2.265 class Rule(Node):
2.266
2.267 @@ -630,7 +630,7 @@
2.268 return "Rule(%d)" % self.height
2.269
2.270 def visit(self, visitor):
2.271 - visitor.rule(self)
2.272 + return visitor.rule(self)
2.273
2.274 class TableAttr(Node):
2.275
2.276 @@ -646,7 +646,7 @@
2.277 return "TableAttr(%r, %r, %r, %r)" % (self.name, self.value, self.concise, self.quote)
2.278
2.279 def visit(self, visitor):
2.280 - visitor.table_attr(self)
2.281 + return visitor.table_attr(self)
2.282
2.283 class Text(Node):
2.284
2.285 @@ -668,7 +668,7 @@
2.286 return "Text(%r)" % self.s
2.287
2.288 def visit(self, visitor):
2.289 - visitor.text(self)
2.290 + return visitor.text(self)
2.291
2.292 class Verbatim(Node):
2.293
2.294 @@ -681,6 +681,6 @@
2.295 return "Verbatim(%r)" % self.text
2.296
2.297 def visit(self, visitor):
2.298 - visitor.verbatim(self)
2.299 + return visitor.verbatim(self)
2.300
2.301 # vim: tabstop=4 expandtab shiftwidth=4
5.1 --- a/moinformat/utils/htmlparse/tree.py Thu Aug 17 22:50:30 2023 +0200
5.2 +++ b/moinformat/utils/htmlparse/tree.py Thu Aug 17 23:33:18 2023 +0200
5.3 @@ -30,7 +30,7 @@
5.4 return "%s(%r, %r)" % (self.__class__.__name__, self.name, self.value)
5.5
5.6 def visit(self, visitor):
5.7 - visitor.attribute(self)
5.8 + return visitor.attribute(self)
5.9
5.10
5.11
5.12 @@ -44,7 +44,7 @@
5.13 return "%s(%r)" % (self.__class__.__name__, self.nodes)
5.14
5.15 def visit(self, visitor):
5.16 - visitor.fragment(self)
5.17 + return visitor.fragment(self)
5.18
5.19 class Element(Fragment):
5.20 def __init__(self, name, attributes=None, nodes=None):
5.21 @@ -56,7 +56,7 @@
5.22 return "%s(%r, %r, %r)" % (self.__class__.__name__, self.name, self.attributes, self.nodes)
5.23
5.24 def visit(self, visitor):
5.25 - visitor.element(self)
5.26 + return visitor.element(self)
5.27
5.28
5.29
5.30 @@ -70,7 +70,7 @@
5.31 return "%s(%r)" % (self.__class__.__name__, self.value)
5.32
5.33 def visit(self, visitor):
5.34 - visitor.node(self)
5.35 + return visitor.node(self)
5.36
5.37 class AttributeValue(Node):
5.38 def __init__(self, value, quote):
5.39 @@ -81,22 +81,22 @@
5.40 return "%s(%r, %r)" % (self.__class__.__name__, self.value, self.quote)
5.41
5.42 def visit(self, visitor):
5.43 - visitor.attribute_value(self)
5.44 + return visitor.attribute_value(self)
5.45
5.46 class Comment(Node):
5.47 def visit(self, visitor):
5.48 - visitor.comment(self)
5.49 + return visitor.comment(self)
5.50
5.51 class Directive(Node):
5.52 def visit(self, visitor):
5.53 - visitor.directive(self)
5.54 + return visitor.directive(self)
5.55
5.56 class Inclusion(Node):
5.57 def visit(self, visitor):
5.58 - visitor.inclusion(self)
5.59 + return visitor.inclusion(self)
5.60
5.61 class Text(Node):
5.62 def visit(self, visitor):
5.63 - visitor.text(self)
5.64 + return visitor.text(self)
5.65
5.66 # vim: tabstop=4 expandtab shiftwidth=4