forked from MapComplete/MapComplete
Refactoring of the climbing theme
This commit is contained in:
parent
c36bce8100
commit
bc953abe48
15 changed files with 1099 additions and 1001 deletions
|
@ -161,7 +161,11 @@ export default class LayerConfig extends WithContextLoader {
|
|||
this.calculatedTags = [];
|
||||
for (const kv of json.calculatedTags) {
|
||||
const index = kv.indexOf("=");
|
||||
let key = kv.substring(0, index);
|
||||
let key = kv.substring(0, index).trim();
|
||||
const r = "[a-z_][a-z0-9:]*"
|
||||
if(key.match(r) === null){
|
||||
throw "At "+context+" invalid key for calculated tag: "+key+"; it should match "+r
|
||||
}
|
||||
const isStrict = key.endsWith(':')
|
||||
if (isStrict) {
|
||||
key = key.substr(0, key.length - 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue