906d98c17b904bb5fa9f77c791811bd8e0f51fbd
[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     EPUB_TAG = HTML_TAG = 'em'
7     EPUB_CLASS = 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