Context sentence properly cut off at newline
The newline character is taken into account 20 lines earlier when looking for the start of the segment, but not when looking for its end. When lines don’t end in punctuation (e. g. notes taken in lectures), this could result in excessively long {sentence} fields. Former-commit-id: 8e25d2d2b7212c23e1a67c96055943c53aca4b36
This commit is contained in:
parent
e759dcd168
commit
7179dd6436
@ -70,7 +70,7 @@ def findSentence(content, position):
|
||||
if c in terminators:
|
||||
end = i + 1
|
||||
break
|
||||
elif c in quotesBwd:
|
||||
elif (c in quotesBwd or c == '\n'):
|
||||
end = i
|
||||
break
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user