@@ -35,7 +35,7 @@ def __eq__(self, value):
35
35
36
36
@property
37
37
def quotation_mark (self ) -> str :
38
- return self ._text_segment .text [self ._start_index : self ._end_index ]. string
38
+ return str ( self ._text_segment .text [self ._start_index : self ._end_index ])
39
39
40
40
def is_valid_opening_quotation_mark (self , quote_conventions : QuoteConventionSet ) -> bool :
41
41
return quote_conventions .is_valid_opening_quotation_mark (self .quotation_mark )
@@ -59,18 +59,18 @@ def previous_character(self) -> Optional[str]:
59
59
if previous_segment is not None and not self ._text_segment .marker_is_in_preceding_context (
60
60
UsfmMarkerType .PARAGRAPH
61
61
):
62
- return previous_segment .text [- 1 ]. string
62
+ return str ( previous_segment .text [- 1 ])
63
63
return None
64
- return self ._text_segment .text [self ._start_index - 1 ]. string
64
+ return str ( self ._text_segment .text [self ._start_index - 1 ])
65
65
66
66
@property
67
67
def next_character (self ) -> Optional [str ]:
68
68
if self .is_at_end_of_segment ():
69
69
next_segment = self ._text_segment .next_segment
70
70
if next_segment is not None and not next_segment .marker_is_in_preceding_context (UsfmMarkerType .PARAGRAPH ):
71
- return next_segment .text [0 ]. string
71
+ return str ( next_segment .text [0 ])
72
72
return None
73
- return self ._text_segment .text [self ._end_index ]. string
73
+ return str ( self ._text_segment .text [self ._end_index ])
74
74
75
75
def leading_substring_matches (self , regex_pattern : regex .Pattern ) -> bool :
76
76
return regex_pattern .search (self ._text_segment .substring_before (self ._start_index )) is not None
@@ -100,9 +100,9 @@ def end_index(self) -> int:
100
100
# Not used, but a useful method for debugging
101
101
@property
102
102
def context (self ) -> str :
103
- return self ._text_segment .text [
103
+ return str ( self ._text_segment .text [
104
104
max (self ._start_index - 10 , 0 ) : min (self ._end_index + 10 , len (self ._text_segment .text ))
105
- ]. string
105
+ ])
106
106
107
107
def resolve (self , depth : int , direction : QuotationMarkDirection ) -> QuotationMarkMetadata :
108
108
return QuotationMarkMetadata (
0 commit comments