move stats to L2
[librarian.git] / src / librarian / elements / paragraphs / akap.py
1 # This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
3 #
4 from ..base import WLElement
5
6
7 class Akap(WLElement):
8     STRIP = True
9     SHOULD_HAVE_ID = True
10
11     TXT_TOP_MARGIN = 2
12     TXT_BOTTOM_MARGIN = 2
13     TXT_LEGACY_TOP_MARGIN = 2
14     TXT_LEGACY_BOTTOM_MARGIN = 0
15
16     HTML_TAG = 'p'
17     EPUB_CLASS = HTML_CLASS = 'paragraph'
18
19     @property
20     def EPUB_TAG(self):
21         try:
22             return self._set_EPUB_TAG
23         except AttributeError:
24             if self.in_context_of('START_INLINE'):
25                 self.signal('INLINE')
26                 self._set_EPUB_TAG = None
27             else:
28                 self._set_EPUB_TAG = 'p'
29             return self._set_EPUB_TAG
30