forked from MapComplete/MapComplete
		
	Fix tests
This commit is contained in:
		
							parent
							
								
									04ee3dc32c
								
							
						
					
					
						commit
						cd8f6788e7
					
				
					 1 changed files with 5 additions and 5 deletions
				
			
		| 
						 | 
					@ -699,7 +699,7 @@ export class RewriteSpecial extends DesugaringStep<TagRenderingConfigJson> {
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private static escapeStr(v: string): string{
 | 
					    private static escapeStr(v: string): string {
 | 
				
			||||||
        return v
 | 
					        return v
 | 
				
			||||||
            .replace(/,/g, "&COMMA")
 | 
					            .replace(/,/g, "&COMMA")
 | 
				
			||||||
            .replace(/\{/g, "&LBRACE")
 | 
					            .replace(/\{/g, "&LBRACE")
 | 
				
			||||||
| 
						 | 
					@ -770,9 +770,7 @@ export class RewriteSpecial extends DesugaringStep<TagRenderingConfigJson> {
 | 
				
			||||||
     *     "special":{
 | 
					     *     "special":{
 | 
				
			||||||
     *          "type": "multi",
 | 
					     *          "type": "multi",
 | 
				
			||||||
     *          "key": "_nearby_bicycle_parkings:props",
 | 
					     *          "key": "_nearby_bicycle_parkings:props",
 | 
				
			||||||
     *          "tagrendering": {
 | 
					     *          "tagrendering": "<b>{id}</b> ({distance}m) {tagApply(a,b,c)}"
 | 
				
			||||||
     *            "*": "<b>{id}</b> ({distance}m) {tagApply(a,b,c)}"
 | 
					 | 
				
			||||||
     *          }
 | 
					 | 
				
			||||||
     *         }}
 | 
					     *         }}
 | 
				
			||||||
     * const context = ConversionContext.test()
 | 
					     * const context = ConversionContext.test()
 | 
				
			||||||
     * RewriteSpecial.convertIfNeeded(special, context) // => {"*": "{multi(_nearby_bicycle_parkings:props,<b>&LBRACEid&RBRACE</b> &LPARENS&LBRACEdistance&RBRACEm&RPARENS &LBRACEtagApply&LPARENSa&COMMAb&COMMAc&RPARENS&RBRACE)}"}
 | 
					     * RewriteSpecial.convertIfNeeded(special, context) // => {"*": "{multi(_nearby_bicycle_parkings:props,<b>&LBRACEid&RBRACE</b> &LPARENS&LBRACEdistance&RBRACEm&RPARENS &LBRACEtagApply&LPARENSa&COMMAb&COMMAc&RPARENS&RBRACE)}"}
 | 
				
			||||||
| 
						 | 
					@ -877,7 +875,9 @@ export class RewriteSpecial extends DesugaringStep<TagRenderingConfigJson> {
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (foundLanguages.size === 0) {
 | 
					        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 {
 | 
					            return {
 | 
				
			||||||
                "*": `{${type}(${args})}`,
 | 
					                "*": `{${type}(${args})}`,
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue