Bind Gutenberg editions by title when Open Library lists no work; answer work pages by searching #1
@@ -769,7 +769,7 @@ fn etext_of(body: &Value, gutenberg_id: u64) -> Etext {
|
||||
pub fn main_title(raw: &str) -> String {
|
||||
let lower = raw.to_lowercase();
|
||||
let head = lower
|
||||
.split(|c: char| matches!(c, ';' | ':' | '(' | '['))
|
||||
.split([';', ':', '(', '['])
|
||||
.next()
|
||||
.unwrap_or_default();
|
||||
let head = head.find(", or").map_or(head, |i| &head[..i]);
|
||||
|
||||
Reference in New Issue
Block a user