Modify ↓
Opened 19 months ago
#23206 new defect
Placeholders in mapcss expressions don't work in suggestAlternative
Reported by: | Famlam | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core validator | Version: | |
Keywords: | template_report suggestAlternative | Cc: |
Description
What steps will reproduce the problem?
- Have the following mapcss validation rule to demonstrate the issue
*[xxx=12345] { throwWarning: tr("3 times same way to get yyy={0}", get(regexp_match("^12345$", "{0.value}"), 0)); suggestAlternative: concat("yyy=", get(regexp_match("^12345$", "{0.value}"), 0)); fixAdd: concat("yyy=", get(regexp_match("^12345$", "{0.value}"), 0)); }
- Validate an element with tag
xxx=12345
- Notice that:
- The throwWarning text is
3 times same way to get yyy=12345
as expected - The fixAdd autofix result is that tag
yyy=12345
is added as expected - However, the suggestAlternative text reads
use yyy= instead
(instead ofuse yyy=12345 instead
)
All three lines use the exact same mapcss code: get(regexp_match("^12345$", "{0.value}"), 0)
.
So it seems that the placeholders in function expressions (added in r18757) work as expected for throw*
and fix*
commands, but they don't seem to work for suggestAlternative
.
Please provide any additional information below. Attach a screenshot if possible.
Revision:18822 Build-Date:2023-08-30 11:44:32 Identification: JOSM/1.5 (18822 nl) Windows 10 64-Bit OS Build number: Windows 10 Home 2009 (19045) Memory Usage: 813 MB / 2012 MB (571 MB allocated, but free) Java version: 17.0.8+7-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel Screen: \Display0 1920×1080 (scaling 1.10×1.10) Maximum Screen Size: 1920×1080 Best cursor sizes: 16×16→32×32, 32×32→32×32 System property file.encoding: Cp1252 System property sun.jnu.encoding: Cp1252 Locale info: nl_NL Numbers with default locale: 1234567890 -> 1234567890 VM arguments: [-Djpackage.app-version=1.5.18822, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=%UserProfile%\AppData\Local\JOSM\JOSM.exe] Plugins: + OpeningHoursEditor (36126) + imagery_offset_db (36126) + pbf (36126) + pt_assistant (2.1.15-19-g9aeec3c-SNAPSHOT) + reverter (36126) + tageditor (36126) + turnlanes-tagging (0.0.5) + undelete (36126) + utilsplugin2 (36126) Map paint styles: - https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/PublicTransport&zip=1 + %UserProfile%\Documents\tijdelijke bestanden\josm-eigen.mappaint.mapcss + https://josm.openstreetmap.de/josmfile?page=Styles/Sidewalks&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/ParkingLanes&zip=1 Validator rules: + %UserProfile%\Documents\tijdelijke bestanden\josm-eigen.validator.mapcss + https://josm.openstreetmap.de/josmfile?page=Rules/SuspiciousSwimming_Pool&zip=1 + https://raw.githubusercontent.com/Famlam/OsmMapcssValidationNL/main/netherlands.validator.mapcss + https://raw.githubusercontent.com/osm-fr/osmose-backend/master/plugins/TagFix_Destination.validator.mapcss + https://raw.githubusercontent.com/osm-fr/osmose-backend/master/plugins/Colour.validator.mapcss + https://raw.githubusercontent.com/osm-fr/osmose-backend/master/plugins/notprefix.validator.mapcss + https://raw.githubusercontent.com/osm-fr/osmose-backend/master/plugins/TagFix_MultipleTag2.validator.mapcss Last errors/warnings: - 00000.913 W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF' - 00000.915 W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF' - 00001.880 E: java.security.KeyStoreException: Windows-ROOT not found. Oorzaak: java.security.NoSuchAlgorithmException: Windows-ROOT KeyStore not available
Attachments (0)
Note:
See TracTickets
for help on using tickets.