mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-08 19:42:12 +00:00
proof: no comma mark after ister or gerek (verb and noun uses)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e91b2dbb97
commit
61105d293a
1 file changed
+13
-3
@@ -128,8 +128,10 @@ const ABBREVIATIONS: &[&str] = &[
|
||||
/// Conjunctions that must not be preceded by a comma.
|
||||
const CONJUNCTIONS_NO_PRE_COMMA: &[&str] = &["ve", "veya", "yahut", "velev", "veyahut", "de", "da"];
|
||||
|
||||
/// Conjunctions that must not be followed by a comma.
|
||||
const CONJUNCTIONS_NO_POST_COMMA: &[&str] = &["ve", "veya", "yahut", "veyahut", "hem", "gerek", "ister"];
|
||||
/// Conjunctions that must not be followed by a comma. Not `ister` and `gerek`: they are
|
||||
/// conjunctions only in `ister … ister` / `gerek … gerek`; otherwise `ister` is the verb
|
||||
/// (`Kim ister, gelsin.`) and `gerek` a noun or adjective, and a comma after them is correct.
|
||||
const CONJUNCTIONS_NO_POST_COMMA: &[&str] = &["ve", "veya", "yahut", "veyahut", "hem"];
|
||||
|
||||
/// Check grammar and punctuation in a Turkish text block.
|
||||
pub fn check(text: &str) -> Vec<Issue> {
|
||||
@@ -411,7 +413,15 @@ mod tests {
|
||||
/// (craft-libs#488 review).
|
||||
#[test]
|
||||
fn a_comma_after_de_ne_or_ya_is_fine() {
|
||||
for text in ["Ali de, Veli de geldi.", "Ne, sen mi geldin?", "Ya, bilmiyorum.", "Bu mesele de, haklı olan bizdik."] {
|
||||
for text in [
|
||||
"Ali de, Veli de geldi.",
|
||||
"Ne, sen mi geldin?",
|
||||
"Ya, bilmiyorum.",
|
||||
"Bu mesele de, haklı olan bizdik.",
|
||||
"Kim ister, gelsin.",
|
||||
"Ali ister, Veli istemez.",
|
||||
"Gerek, yok.",
|
||||
] {
|
||||
assert!(check(text).is_empty(), "{text}: {:?}", check(text));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user