X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/0604bdd5f693da9f1c78f9d9fa2276f0c7b6c17b..e18e5408fa57b7c680e7b834a964501898623117:/src/librarian/elements/poetry/strofa.py?ds=inline diff --git a/src/librarian/elements/poetry/strofa.py b/src/librarian/elements/poetry/strofa.py index 2d3a4c9..7df549f 100644 --- a/src/librarian/elements/poetry/strofa.py +++ b/src/librarian/elements/poetry/strofa.py @@ -9,6 +9,9 @@ class Strofa(WLElement): TXT_LEGACY_TOP_MARGIN = 1 TXT_LEGACY_BOTTOM_MARGIN = 0 + HTML_TAG = 'div' + HTML_CLASS = 'stanza' + def get_verses(self): from librarian.parser import parser @@ -38,6 +41,7 @@ class Strofa(WLElement): verses[-1].append(child) for verse in verses: + verse.stanza = self if len(verse) == 1 and isinstance(verse[0], Wers): assert not (verse.text or '').strip() assert not (verse[0].tail or '').strip()