Experimental class-based conversion now working for TXT and HTML.
[librarian.git] / src / librarian / elements / styles / tytul_dziela.py
1 # -*- coding: utf-8
2 from ..base import WLElement
3
4
5 class TytulDziela(WLElement):
6     HTML_TAG = 'em'
7     HTML_CLASS = 'book-title'
8
9     def normalize_text(self, text):
10         txt = super(TytulDziela, self).normalize_text(text)
11         if self.attrib.get('typ') == '1':
12             txt = '„{txt}”'.format(txt=txt)
13         return txt