Use consistent fallback for missing/malformed lists
This commit is contained in:
parent
cec1c7eadc
commit
1186370d5a
2 changed files with 9 additions and 2 deletions
|
@ -22,5 +22,12 @@ pub fn save_missing_games(wiki_cache: &WikiCache, manifest: &Manifest, overrides
|
|||
.map(|(k, v)| format!("* [{}](https://www.pcgamingwiki.com/wiki/?curid={})", k, v.page_id))
|
||||
.collect();
|
||||
|
||||
_ = std::fs::write(format!("{}/data/missing.md", REPO), lines.join("\n") + "\n");
|
||||
_ = std::fs::write(
|
||||
format!("{}/data/missing.md", REPO),
|
||||
if lines.is_empty() {
|
||||
"N/A".to_string()
|
||||
} else {
|
||||
lines.join("\n") + "\n"
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1123,7 +1123,7 @@ pub fn save_malformed_list(wiki_cache: &WikiCache) {
|
|||
_ = std::fs::write(
|
||||
format!("{}/data/wiki-malformed.md", crate::REPO),
|
||||
if lines.is_empty() {
|
||||
"* No errors found".to_string()
|
||||
"N/A".to_string()
|
||||
} else {
|
||||
lines.join("\n") + "\n"
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue