forked from MapComplete/MapComplete
		
	Remove some shadowed mappings, improve error message
This commit is contained in:
		
							parent
							
								
									830a927929
								
							
						
					
					
						commit
						42c5272a0c
					
				
					 3 changed files with 10 additions and 17 deletions
				
			
		|  | @ -276,7 +276,13 @@ export class DetectShadowedMappings extends DesugaringStep<TagRenderingConfigJso | ||||||
|     The mapping ${parsedConditions[i].asHumanString(false, false, {})} is fully matched by a previous mapping (namely ${j}), which matches: |     The mapping ${parsedConditions[i].asHumanString(false, false, {})} is fully matched by a previous mapping (namely ${j}), which matches: | ||||||
|     ${parsedConditions[j].asHumanString(false, false, {})}. |     ${parsedConditions[j].asHumanString(false, false, {})}. | ||||||
|      |      | ||||||
|     Move the mapping up to fix this problem |     To fix this problem, you can try to: | ||||||
|  |     - Move the shadowed mapping up | ||||||
|  |     - Use "addExtraTags": ["key=value", ...] in order to avoid a different rendering | ||||||
|  |          (e.g. [{"if": "fee=no",                     "then": "Free to use", "hideInAnswer":true}, | ||||||
|  |                 {"if": {"and":["fee=no","charge="]}, "then": "Free to use"}] | ||||||
|  |           can be replaced by | ||||||
|  |                [{"if":"fee=no", "then": "Free to use", "addExtraTags": ["charge="]}] | ||||||
| `)
 | `)
 | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |  | ||||||
|  | @ -538,16 +538,7 @@ | ||||||
|               ] |               ] | ||||||
|             }, |             }, | ||||||
|             "then": "Beheer door een privépersoon", |             "then": "Beheer door een privépersoon", | ||||||
|             "hideInAnswer": true |             "addExtraTags": ["operator="] | ||||||
|           }, |  | ||||||
|           { |  | ||||||
|             "if": { |  | ||||||
|               "and": [ |  | ||||||
|                 "operator:type=private", |  | ||||||
|                 "operator=" |  | ||||||
|               ] |  | ||||||
|             }, |  | ||||||
|             "then": "Beheer door een privépersoon" |  | ||||||
|           } |           } | ||||||
|         ], |         ], | ||||||
|         "condition": { |         "condition": { | ||||||
|  |  | ||||||
|  | @ -199,12 +199,8 @@ | ||||||
|                 "nl": "Kan gratis gebruikt worden", |                 "nl": "Kan gratis gebruikt worden", | ||||||
|                 "pt_BR": "Pode ser usado de graça", |                 "pt_BR": "Pode ser usado de graça", | ||||||
|                 "de": "Nutzung kostenlos" |                 "de": "Nutzung kostenlos" | ||||||
|               } |               }, | ||||||
|             }, |               "addExtraTags": ["charge="] | ||||||
|             { |  | ||||||
|               "if": "fee=no", |  | ||||||
|               "then": "Can be used for free", |  | ||||||
|               "hideInAnswer": true |  | ||||||
|             } |             } | ||||||
|           ] |           ] | ||||||
|         }, |         }, | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue