1 # This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
4 from ..base import WLElement
13 EPUB_TAG = HTML_TAG = 'div'
15 HTML_CLASS = 'wl verse'
22 if hasattr(self, 'stanza'):
23 return self.stanza.meta
24 return super(Wers, self).meta
26 def epub_build_inner(self, builder):
27 super().epub_build_inner(builder)
28 builder.push_text('''\u00a0''')
31 def has_visible_numbering(self):
33 number = int(self.attrib['_visible_numbering'])
36 return number == 1 or not(number % 5)
39 def is_stretched(self):
40 return self.find('.//tab[@szer="*"]') is not None
42 def get_html_attr(self, builder):
43 attr = super().get_html_attr(builder)
45 attr['class'] += ' verse-stretched'
48 def html_build_inner(self, builder):
50 builder.start_element('span')
51 super().html_build_inner(builder)