Map an additional Path template argument

This commit is contained in:
mtkennerly 2023-12-09 15:12:14 +08:00
parent 716a2a1dfe
commit f9fd72e887
No known key found for this signature in database
GPG key ID: E764BE00BE6E6408
2 changed files with 18 additions and 4 deletions

View file

@ -741,8 +741,10 @@ pub fn flatten_path(attribute: &Attribute) -> WikiPath {
out
}
/// https://www.pcgamingwiki.com/wiki/Template:Path
static MAPPED_PATHS: Lazy<HashMap<&'static str, MappedPath>> = Lazy::new(|| {
HashMap::from_iter([
// General
(
"game",
MappedPath {
@ -781,6 +783,7 @@ static MAPPED_PATHS: Lazy<HashMap<&'static str, MappedPath>> = Lazy::new(|| {
..Default::default()
},
),
// Windows registry
(
"hkcu",
MappedPath {
@ -808,6 +811,7 @@ static MAPPED_PATHS: Lazy<HashMap<&'static str, MappedPath>> = Lazy::new(|| {
..Default::default()
},
),
// Windows filesystem
(
"username",
MappedPath {
@ -880,6 +884,14 @@ static MAPPED_PATHS: Lazy<HashMap<&'static str, MappedPath>> = Lazy::new(|| {
..Default::default()
},
),
(
"programfiles",
MappedPath {
manifest: "C:/Program Files",
os: Some(Os::Windows),
..Default::default()
},
),
(
"windir",
MappedPath {
@ -896,6 +908,7 @@ static MAPPED_PATHS: Lazy<HashMap<&'static str, MappedPath>> = Lazy::new(|| {
..Default::default()
},
),
// Mac
(
"osxhome",
MappedPath {
@ -904,6 +917,7 @@ static MAPPED_PATHS: Lazy<HashMap<&'static str, MappedPath>> = Lazy::new(|| {
..Default::default()
},
),
// Linux
(
"linuxhome",
MappedPath {