From cd8f6788e7e2e443592dc35d56dee5ac5fc2acb0 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 16 Jan 2024 04:52:05 +0100 Subject: [PATCH] Fix tests --- src/Models/ThemeConfig/Conversion/PrepareLayer.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Models/ThemeConfig/Conversion/PrepareLayer.ts b/src/Models/ThemeConfig/Conversion/PrepareLayer.ts index 16611e0d7..3906f9d7a 100644 --- a/src/Models/ThemeConfig/Conversion/PrepareLayer.ts +++ b/src/Models/ThemeConfig/Conversion/PrepareLayer.ts @@ -699,7 +699,7 @@ export class RewriteSpecial extends DesugaringStep { ) } - private static escapeStr(v: string): string{ + private static escapeStr(v: string): string { return v .replace(/,/g, "&COMMA") .replace(/\{/g, "&LBRACE") @@ -770,9 +770,7 @@ export class RewriteSpecial extends DesugaringStep { * "special":{ * "type": "multi", * "key": "_nearby_bicycle_parkings:props", - * "tagrendering": { - * "*": "{id} ({distance}m) {tagApply(a,b,c)}" - * } + * "tagrendering": "{id} ({distance}m) {tagApply(a,b,c)}" * }} * const context = ConversionContext.test() * RewriteSpecial.convertIfNeeded(special, context) // => {"*": "{multi(_nearby_bicycle_parkings:props,&LBRACEid&RBRACE &LPARENS&LBRACEdistance&RBRACEm&RPARENS &LBRACEtagApply&LPARENSa&COMMAb&COMMAc&RPARENS&RBRACE)}"} @@ -877,7 +875,9 @@ export class RewriteSpecial extends DesugaringStep { } if (foundLanguages.size === 0) { - const args = argNamesList.map((nm) => RewriteSpecial.escapeStr(special[nm] ?? "")).join(",") + const args = argNamesList + .map((nm) => RewriteSpecial.escapeStr(special[nm] ?? "")) + .join(",") return { "*": `{${type}(${args})}`, }