diff --git a/crates/mind-body/src/projection/read.rs b/crates/mind-body/src/projection/read.rs index 71a4f23..8068f53 100644 --- a/crates/mind-body/src/projection/read.rs +++ b/crates/mind-body/src/projection/read.rs @@ -363,11 +363,13 @@ pub(crate) fn reach(asked: &Asked, packet: &Packet, prose: &str, reached: &[Stri /// Whether `text` names the repo `repo` (lowercase): as a whole repo-name token, case-blind, where a token runs over /// letters, digits, `-`, `.` and `_`, as a repo name does (`repo_target`), so `GameCult/gamecult-ops#125` names /// `gamecult-ops` and "ops" names nothing of it. A token's trailing `.`, `-` or `_` (a sentence's full stop) is not part -/// of the name. The one matcher of what repo is in front of her (map 16.25.5), at open and at read. +/// of the name, and the org of `GameCult/` names no repo. The one matcher of what repo is in front of her (map +/// 16.25.5, 16.26), at open and at read. fn names_repo(text: &str, repo: &str) -> bool { + let text = text.to_lowercase().replace("gamecult/", " "); text.split(|c: char| !(c.is_alphanumeric() || matches!(c, '-' | '.' | '_'))) .filter(|token| !token.is_empty()) - .any(|token| token.eq_ignore_ascii_case(repo) || token.trim_end_matches(['.', '-', '_']).eq_ignore_ascii_case(repo)) + .any(|token| token == repo || token.trim_end_matches(['.', '-', '_']) == repo) } /// Whether `target` is a digest id: `d` and a number.