Release with current fixes.
[librarian.git] / src / librarian / elements / paragraphs / akap.py
1 from ..base import WLElement
2
3
4 class Akap(WLElement):
5     STRIP = True
6
7     TXT_TOP_MARGIN = 2
8     TXT_BOTTOM_MARGIN = 2
9     TXT_LEGACY_TOP_MARGIN = 2
10     TXT_LEGACY_BOTTOM_MARGIN = 0
11
12     HTML_TAG = 'p'
13     EPUB_CLASS = HTML_CLASS = 'paragraph'
14
15     @property
16     def EPUB_TAG(self):
17         try:
18             return self._set_EPUB_TAG
19         except AttributeError:
20             if self.in_context_of('START_INLINE'):
21                 self.signal('INLINE')
22                 self._set_EPUB_TAG = None
23             else:
24                 self._set_EPUB_TAG = 'p'
25             return self._set_EPUB_TAG
26