# The simple wikidata-tag (this is limited to only one value)
if key == "wikidata" && value =~ /^[Qq][1-9][0-9]*$/
return [{
# The simple wikidata-tag (this is limited to only one value)
if key == "wikidata" && value =~ /^[Qq][1-9][0-9]*$/
return [{
# Value has to be a semicolon-separated list of wikidata-IDs (whitespaces allowed before and after semicolons)
value =~ /^[Qq][1-9][0-9]*(\s*;\s*[Qq][1-9][0-9]*)*$/
# Splitting at every semicolon to get a separate hash for each wikidata-ID
return value.split(";").map do |id|
# Value has to be a semicolon-separated list of wikidata-IDs (whitespaces allowed before and after semicolons)
value =~ /^[Qq][1-9][0-9]*(\s*;\s*[Qq][1-9][0-9]*)*$/
# Splitting at every semicolon to get a separate hash for each wikidata-ID
return value.split(";").map do |id|