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
« prev ^ index » next coverage.py v7.8.0, created at 2025-09-28 19:17 +0000
1"""Position anchor enumeration for text preservation.
3This module defines where preserved text appears in relation to structural elements.
4"""
6from enum import Enum
9class PositionAnchor(Enum):
10 """Define where preserved text appears in relation to structural elements.
12 This enum provides positioning context for extraneous text that needs
13 to be preserved during binder operations.
14 """
16 BEFORE_STRUCTURE = 'before_structure'
17 """Text appears before any structural elements."""
19 BETWEEN_ELEMENTS = 'between_elements'
20 """Text appears between structural elements."""
22 AFTER_STRUCTURE = 'after_structure'
23 """Text appears after all structural elements."""
25 INLINE_WITH_ELEMENT = 'inline_with_element'
26 """Text on same line as structural element."""
28 def __str__(self) -> str:
29 """Return string representation of the anchor position."""
30 return self.name