Modify ↓
Opened 11 years ago
Closed 9 years ago
#10467 closed enhancement (fixed)
[Patch] regex in key conditions doesn't allow comparisons
Reported by: | naoliv | Owned by: | simon04 |
---|---|---|---|
Priority: | normal | Milestone: | 15.10 |
Component: | Core validator | Version: | |
Keywords: | mapcss | Cc: | lists@… |
Description
It seems that regex in key conditions [6547] doesn't allow comparisons.
For example:
*[/^source/ =~ /.*,.*/] { throwOther: tr("you should use ;"); }
gives
org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.ParseException: Encountered " <REGEX> "/^source/ "" at line 512, column 3. Was expecting one of: "set" ... <IDENT> ... <UINT> ... <STRING> ... "(" ... <UFLOAT> ... <HEXCOLOR> ... <S> ... "!" ... "+" ... "-" ... "!" ... <STRING> ... <IDENT> ... "set" ... at org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.MapCSSParser.error_skipto(MapCSSParser.java:1805) at org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.MapCSSParser.sheet(MapCSSParser.java:677) at org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker$TagCheck.readMapCSS(MapCSSTagChecker.java:267) at org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker$TagCheck.readMapCSS(MapCSSTagChecker.java:261) at org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.addMapCSS(MapCSSTagChecker.java:566) at org.openstreetmap.josm.io.FileWatcher.processEvents(FileWatcher.java:143) at org.openstreetmap.josm.io.FileWatcher.access$000(FileWatcher.java:30) at org.openstreetmap.josm.io.FileWatcher$1.run(FileWatcher.java:46) at java.lang.Thread.run(Thread.java:745)
JOSM:
Repository Root: http://josm.openstreetmap.de/svn Build-Date: 2014-09-02 01:36:00 Last Changed Author: Don-vip Revision: 7485 Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b URL: http://josm.openstreetmap.de/svn/trunk Last Changed Date: 2014-09-02 02:57:38 +0200 (Tue, 02 Sep 2014) Last Changed Rev: 7485
Attachments (1)
Change History (6)
comment:1 by , 11 years ago
Type: | defect → enhancement |
---|
comment:2 by , 11 years ago
Cc: | added |
---|
comment:3 by , 9 years ago
Milestone: | → 15.10 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Summary: | regex in key conditions doesn't allow comparisons → [Patch] regex in key conditions doesn't allow comparisons |
by , 9 years ago
Attachment: | 10467.patch added |
---|
Note:
See TracTickets
for help on using tickets.
This syntax is not supported at the moment.