1

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:
felixvd 2015-02-11 01:54:41 +09:00
parent e759dcd168
commit 7179dd6436

View File

@ -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