citefind: chapter and verse is not a work in a bibliography

Found by putting a real model at the end of the chain: a page of notes from a
theological book composed a prompt asking who wrote Matthew 4:17, and the
model rightly answered nothing for all twenty-three entries.

Those are scripture references, which is most of what the notes of such a book
are, and they are now not references at all — no record, and no question put
to anybody about them. A journal and its volume look similar on the page and
are still read as what they are.

Also: the stop that belonged to a marker no longer opens the entry after it.
This commit is contained in:
funkpower committed 2026-09-20 11:39:41 -04:00
1 parent 2a2ecdc018
commit b70fdbd413
3 files changed
+66 -1

No files matched your search

+12 -1
View File
@@ -249,7 +249,11 @@ fn strip_marker(raw: &str) -> Entry {
let consumed = bare[..whole.end()].chars().count();
let cut = from[consumed];
return Entry {
text: text[cut..].trim_start().to_string(),
// `[4] . Smith, John` leaves the stop that belonged to the
// marker sitting in front of the entry.
text: text[cut..]
.trim_start_matches(|c: char| ".) ".contains(c))
.to_string(),
marker: Some(found[1].to_string()),
};
}
@@ -425,6 +429,13 @@ Another Anonymous Work. Cambridge, 2001.";
assert_eq!(entry.text, "Smith, *Title*, p. 4.");
}
#[test]
fn a_stop_that_belonged_to_the_marker_does_not_start_the_entry() {
let entry = strip_marker("[4] . Smith, John. *A Real Book*. Oxford, 1998.");
assert_eq!(entry.marker.as_deref(), Some("4"));
assert_eq!(entry.text, "Smith, John. *A Real Book*. Oxford, 1998.");
}
#[test]
fn an_entry_with_no_marker_keeps_all_of_itself() {
let entry = strip_marker("Smith, John. The Title. Oxford, 1998.");