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'
21 if hasattr(self, 'stanza'):
22 return self.stanza.meta
23 return super(Wers, self).meta
25 def epub_build_inner(self, builder):
26 super().epub_build_inner(builder)
27 builder.push_text('''\u00a0''')
30 def has_visible_numbering(self):
32 number = int(self.attrib['_visible_numbering'])
35 return number == 1 or not(number % 5)
38 def is_stretched(self):
39 return self.find('.//tab[@szer="*"]') is not None
41 def get_html_attr(self, builder):
42 attr = super().get_html_attr(builder)
44 attr['class'] += ' verse-stretched'
47 def html_build_inner(self, builder):
49 builder.start_element('span')
50 super().html_build_inner(builder)