Remove some shadowed mappings, improve error message

This commit is contained in:
Pieter Vander Vennet 2022-03-17 22:03:41 +01:00
parent 830a927929
commit 42c5272a0c
3 changed files with 10 additions and 17 deletions

View file

@ -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:
${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="]}]
`)
}
}