Remove legacy code for txt.
[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     NUMBERING = 'main'
10
11     TXT_TOP_MARGIN = 2
12     TXT_BOTTOM_MARGIN = 2
13
14     EPUB_CLASS = 'paragraph'
15
16     HTML_TAG = 'p'
17     HTML_CLASS = 'wl paragraph'
18
19     has_visible_numbering = True
20
21     @property
22     def EPUB_TAG(self):
23         try:
24             return self._set_EPUB_TAG
25         except AttributeError:
26             if self.in_context_of('START_INLINE'):
27                 self.signal('INLINE')
28                 self._set_EPUB_TAG = None
29             else:
30                 self._set_EPUB_TAG = 'p'
31             return self._set_EPUB_TAG
32