4 class WersWciety(Wers):
7 v = self.attrib.get('typ')
8 return int(v) if v else 1
10 def _txt_build_inner(self, builder):
11 ## Temporary legacy compatibility fix.
12 typ = min(self.typ, 2)
14 builder.push_text(' ' * self.typ, prepared=True)
15 super(WersWciety, self)._txt_build_inner(builder)
17 def get_html_attr(self, builder):
18 attr = super(WersWciety, self).get_html_attr(builder)
19 attr['style'] = "padding-left: {}em".format(self.typ)
22 def get_epub_attr(self, builder):
23 attr = super(WersWciety, self).get_html_attr(builder)
24 attr['style'] = "margin-left: {}em".format(self.typ)