Full code cleanup

This commit is contained in:
Pieter Vander Vennet 2022-01-26 21:40:38 +01:00
parent 3a4a2a2016
commit fa971ffbbf
300 changed files with 16352 additions and 19284 deletions

View file

@ -19,6 +19,17 @@ export default class Link extends BaseUIElement {
}
public static OsmWiki(key: string, value?: string, hideKey = false) {
if (value !== undefined) {
let k = "";
if (!hideKey) {
k = key + "="
}
return new Link(k + value, `https://wiki.openstreetmap.org/wiki/Tag:${key}%3D${value}`)
}
return new Link(key, "https://wiki.openstreetmap.org/wiki/Key:" + key)
}
AsMarkdown(): string {
// @ts-ignore
return `[${this._embeddedShow.AsMarkdown()}](${this._href.data ?? this._href})`;
@ -44,15 +55,4 @@ export default class Link extends BaseUIElement {
return el;
}
public static OsmWiki(key: string, value?: string, hideKey = false) {
if (value !== undefined) {
let k = "";
if (!hideKey) {
k = key + "="
}
return new Link(k + value, `https://wiki.openstreetmap.org/wiki/Tag:${key}%3D${value}`)
}
return new Link(key, "https://wiki.openstreetmap.org/wiki/Key:" + key)
}
}