Coverage for src/prosemark/domain/position_anchor.py: 100%

12 statements  

« prev     ^ index     » next       coverage.py v7.8.0, created at 2025-09-28 19:17 +0000

1"""Position anchor enumeration for text preservation. 

2 

3This module defines where preserved text appears in relation to structural elements. 

4""" 

5 

6from enum import Enum 

7 

8 

9class PositionAnchor(Enum): 

10 """Define where preserved text appears in relation to structural elements. 

11 

12 This enum provides positioning context for extraneous text that needs 

13 to be preserved during binder operations. 

14 """ 

15 

16 BEFORE_STRUCTURE = 'before_structure' 

17 """Text appears before any structural elements.""" 

18 

19 BETWEEN_ELEMENTS = 'between_elements' 

20 """Text appears between structural elements.""" 

21 

22 AFTER_STRUCTURE = 'after_structure' 

23 """Text appears after all structural elements.""" 

24 

25 INLINE_WITH_ELEMENT = 'inline_with_element' 

26 """Text on same line as structural element.""" 

27 

28 def __str__(self) -> str: 

29 """Return string representation of the anchor position.""" 

30 return self.name