mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-05 15:17:37 +03:00
add quotes to punctuation list
This commit is contained in:
parent
a6d6e5e770
commit
394fc41819
@ -20,10 +20,11 @@ constexpr char SOFT_HYPHEN_UTF8[] = "\xC2\xAD";
|
|||||||
constexpr size_t SOFT_HYPHEN_BYTES = 2;
|
constexpr size_t SOFT_HYPHEN_BYTES = 2;
|
||||||
|
|
||||||
// Check if a character is punctuation that should attach to the previous word
|
// Check if a character is punctuation that should attach to the previous word
|
||||||
// (no space before it). Limited to sentence-ending and clause-separating punctuation
|
// (no space before it). Includes sentence punctuation and closing quotes.
|
||||||
// to avoid false positives with decorative brackets like "[ 1 ]".
|
// Excludes brackets/parens to avoid false positives with decorative patterns like "[ 1 ]".
|
||||||
bool isAttachingPunctuation(const char c) {
|
bool isAttachingPunctuation(const char c) {
|
||||||
return c == '.' || c == ',' || c == '!' || c == '?' || c == ';' || c == ':';
|
return c == '.' || c == ',' || c == '!' || c == '?' || c == ';' || c == ':' ||
|
||||||
|
c == '"' || c == '\'';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if a word consists entirely of punctuation that should attach to the previous word
|
// Check if a word consists entirely of punctuation that should attach to the previous word
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user