Allow property usage templates of any language

- as long as it contains "Wikidata"
This commit is contained in:
2025-08-03 22:27:27 +02:00
parent 36a3093522
commit e3ae480f6b
+1 -1
View File
@@ -8,7 +8,7 @@ pub mod wikipedia_infobox_analyzer {
pub fn extract_used_properties_from_template(template: String) -> Vec<String> { pub fn extract_used_properties_from_template(template: String) -> Vec<String> {
let mut lines = template.lines(); let mut lines = template.lines();
let used = lines let used = lines
.find(|line| line.starts_with("{{Gebruikt Wikidata")) .find(|line| line.starts_with("{{") && line.contains("Wikidata|"))
.expect("Template should have a line declaring which properties are used"); .expect("Template should have a line declaring which properties are used");
// The properties are listed inside the template with their number: P1|P2|P... // The properties are listed inside the template with their number: P1|P2|P...