GNU bug report logs -
#56844
[PATCH] Refactor repunctuate-sentences to accommodate corner case.
Previous Next
Reported by: André A. Gomes <andremegafone <at> gmail.com>
Date: Sat, 30 Jul 2022 18:07:02 UTC
Severity: wishlist
Tags: moreinfo, patch
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #16 received at 56844 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>> + (regexp "\\([]\"')]?\\)\\([.?!]\\)\\([]\"')]?\\) +\\([\"')[:upper:]]\\)")
>
> I'm not quite sure I understand this patch. Are you changing this to
> only consider punctuation that's followed by an upper-case character to
> be sentence-end punctuation?
Yes. The patch section relative to testing is illustrative:
--8<---------------cut here---------------start------------->8---
(ert-deftest paragraphs-tests-repunctuate-sentences ()
(with-temp-buffer
- (insert "Just. Some. Sentences.")
+ (insert "Just. Some. Sentences. Yet another, e.g. this one.")
(goto-char (point-min))
(repunctuate-sentences t)
- (should (equal (buffer-string) "Just. Some. Sentences."))))
+ (should (equal (buffer-string)
+ "Just. Some. Sentences. Yet another, e.g. this one."))))
--8<---------------cut here---------------end--------------->8---
Thanks.
--
André A. Gomes
"You cannot even find the ruins..."
This bug report was last modified 2 years and 264 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.