chore: automated housekeeping...

This commit is contained in:
Pieter Vander Vennet 2024-11-07 11:19:15 +01:00
parent a2dd79c4ec
commit 7b792af261
101 changed files with 2196 additions and 22043 deletions

View file

@ -141,7 +141,7 @@ class ExpandFilter extends DesugaringStep<LayerConfigJson> {
"Found a matching tagRendering to base a filter on, but this tagRendering does not contain any mappings"
)
}
const qtr = (<QuestionableTagRenderingConfigJson>tr)
const qtr = <QuestionableTagRenderingConfigJson>tr
const options = qtr.mappings.map((mapping) => {
let icon: string = mapping.icon?.["path"] ?? mapping.icon
let emoji: string = undefined
@ -149,12 +149,15 @@ class ExpandFilter extends DesugaringStep<LayerConfigJson> {
emoji = icon
icon = undefined
}
let osmTags = TagUtils.Tag( mapping.if)
if(qtr.multiAnswer && osmTags instanceof Tag){
osmTags = new RegexTag(osmTags.key, new RegExp("^(.+;)?"+osmTags.value+"(;.+)$","is"))
let osmTags = TagUtils.Tag(mapping.if)
if (qtr.multiAnswer && osmTags instanceof Tag) {
osmTags = new RegexTag(
osmTags.key,
new RegExp("^(.+;)?" + osmTags.value + "(;.+)$", "is")
)
}
if(mapping.alsoShowIf){
osmTags= new Or([osmTags, TagUtils.Tag(mapping.alsoShowIf)])
if (mapping.alsoShowIf) {
osmTags = new Or([osmTags, TagUtils.Tag(mapping.alsoShowIf)])
}
return <FilterConfigOptionJson>{