Fix additional paths related to template name issue

This commit is contained in:
mtkennerly 2022-06-24 01:09:47 +08:00
parent 2ae7df680b
commit dd6b958c6c
No known key found for this signature in database
GPG key ID: E764BE00BE6E6408
3 changed files with 48 additions and 33 deletions

View file

@ -158,6 +158,11 @@ function integrateSteamData(game: Game, appInfo: SteamGameCache[""]) {
}
}
function isPathRegular(path: string): boolean {
const irregular = ["{{", "</", "/>", "<br>", "//"];
return !irregular.some(x => path.includes(x))
}
export class ManifestFile extends YamlFile<Manifest> {
path = `${REPO}/data/manifest.yaml`;
defaultData = {};
@ -224,8 +229,8 @@ export class ManifestFile extends YamlFile<Manifest> {
filter.irregularPathUntagged &&
!wikiCache[title].irregularPath &&
(
Object.keys(this.data[title]?.files ?? []).some(x => x.includes("{{") || x.includes("</") || x.includes("/>") || x.includes("<br>")) ||
Object.keys(this.data[title]?.registry ?? []).some(x => x.includes("{{") || x.includes("</") || x.includes("/>") || x.includes("<br>"))
Object.keys(this.data[title]?.files ?? []).some(x => !isPathRegular(x)) ||
Object.keys(this.data[title]?.registry ?? []).some(x => !isPathRegular(x))
)
) {
check = true;