Allow property usage templates of any language
- as long as it contains "Wikidata"
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@ pub mod wikipedia_infobox_analyzer {
|
||||
pub fn extract_used_properties_from_template(template: String) -> Vec<String> {
|
||||
let mut lines = template.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");
|
||||
|
||||
// The properties are listed inside the template with their number: P1|P2|P...
|
||||
|
||||
Reference in New Issue
Block a user