Sitemap parser: Fix negative numbers not allowed for visibility (#1928)
The sitemap DSL parser was not able to correctly recognize negative numbers. Regression from https://github.com/openhab/openhab-webui/pull/1843 where explicit recognition of hyphens was introduced for new icon syntax. Signed-off-by: Mark Herwege <mark.herwege@telenet.be>pull/1934/head
parent
81e12f5f44
commit
49de601b58
|
@ -20,7 +20,6 @@
|
|||
lwidget: ['Text ', 'Group ', 'Image ', 'Frame '],
|
||||
lparen: '(',
|
||||
rparen: ')',
|
||||
colon: ':',
|
||||
lbrace: '{',
|
||||
rbrace: '}',
|
||||
lbracket: '[',
|
||||
|
@ -32,13 +31,13 @@
|
|||
lt: '<',
|
||||
gt: '>',
|
||||
equals: '=',
|
||||
comma: ',',
|
||||
colon: ':',
|
||||
hyphen: '-',
|
||||
NL: { match: /\n/, lineBreaks: true },
|
||||
boolean: /(?:true)|(?:false)/,
|
||||
identifier: /(?:[A-Za-z_][A-Za-z0-9_]*)|(?:[0-9]+[A-Za-z_][A-Za-z0-9_]*)/,
|
||||
number: /\-?[0-9]+(?:\.[0-9]*)?/,
|
||||
number: /-?[0-9]+(?:\.[0-9]*)?/,
|
||||
comma: ',',
|
||||
colon: ':',
|
||||
hyphen: '-',
|
||||
string: { match: /"(?:\\["\\]|[^\n"\\])*"/, value: x => x.slice(1, -1) }
|
||||
})
|
||||
const requiresItem = ['Group', 'Chart', 'Switch', 'Mapview', 'Slider', 'Selection', 'Setpoint', 'Input ', 'Colorpicker', 'Default']
|
||||
|
|
Loading…
Reference in New Issue