New version with the new EPUB converter.
[librarian.git] / src / librarian / elements / poetry / wers.py
index e164b1d..55cf537 100644 (file)
@@ -9,5 +9,16 @@ class Wers(WLElement):
     TXT_LEGACY_TOP_MARGIN = 1
     TXT_LEGACY_BOTTOM_MARGIN = 0
 
-    HTML_TAG = 'div'
-    HTML_ATTRIB = {"class": "verse"}
+    EPUB_TAG = HTML_TAG = 'div'
+    EPUB_CLASS = HTML_CLASS = 'verse'
+
+    @property
+    def meta(self):
+        if hasattr(self, 'stanza'):
+            return self.stanza.meta
+        return super(Wers, self).meta
+
+    def _epub_build_inner(self, builder):
+        super()._epub_build_inner(builder)
+        builder.push_text('''\u00a0''')
+