mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-10 21:31:53 +01:00
[Sitemap UI] Do not break format defined in label with extra spaces (#3708)
Fix openhab/openhab-webui#1953 Fix a regression introduced by PR #3644 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
parent
66dec25571
commit
f71137331f
@ -515,7 +515,8 @@ public class ItemUIRegistryImpl implements ItemUIRegistry {
|
||||
"Item '{}' with unit, nothing allowed after unit in label pattern '{}', dropping postfix",
|
||||
itemName, pattern);
|
||||
}
|
||||
pattern = pattern.substring(0, matcherEnd) + (!unit.isBlank() ? " " + unit : "");
|
||||
pattern = unit.isBlank() ? pattern.substring(0, matcherEnd)
|
||||
: pattern.substring(0, pattern.indexOf(unit, matcherEnd) + unit.length());
|
||||
}
|
||||
} catch (ItemNotFoundException e) {
|
||||
logger.warn("Cannot retrieve item '{}' for widget {}", itemName, w.eClass().getInstanceTypeName());
|
||||
|
Loading…
Reference in New Issue
Block a user