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