﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
17669	[PATCH][RFC] tag() in validator.mapcss should allow placeholders	taylor.smock	team	"==== What steps will reproduce the problem?
{{{
#!mapcss
*[/name/=~/.*([‘’]+).*/] {
  throwError: tr(""Avoid using unicode '' in names (‘’) ({0})"", ""{0.key}"");
  suggestAlternative: ""'"";
  fixAdd: concat(""{0.key}"", ""="", tag(""{0.key}""), "" "", ""{0.key}"");
  assertNoMatch: ""way name=\""Testing's Road\"""";
  assertMatch: ""way name=\""Testing‘s Road\"""";
  assertMatch: ""way name=\""Testing’s Road\"""";
}
}}}

Test way:
`way name=\""Testing‘s Road\""`
==== What is the expected result?
I expect the name to become (with the above code) `way name=\""Testing's Road name\""`.

==== What happens instead?
I get (with the above code) `way name=\"" name\""`.

==== Please provide any additional information below. Attach a screenshot if possible.
It does not appear to be a nested function issue (I checked with nested `concat`s).

{{{
Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2019-04-28 04:36:41 +0200 (Sun, 28 Apr 2019)
Revision:15031
Build-Date:2019-04-28 02:37:58
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (15031 en) Mac OS X 10.14.4
OS Build number: Mac OS X 10.14.4 (18E226)
Memory Usage: 375 MB / 2048 MB (116 MB allocated, but free)
Java version: 12+33, Oracle Corporation, OpenJDK 64-Bit Server VM
Screen: Display 188945226 1920x1080, Display 69978068 2048x1152
Maximum Screen Size: 2048x1152
Dataset consistency test: No problems found

Plugins:
+ Mapillary (1.5.18)
+ apache-commons (34908)
+ apache-http (34908)
+ auto_tools (73)
+ buildings_tools (34982)
+ continuosDownload (82)
+ graphview (34977)
+ gson (34908)
+ highwayNameModification (1555020960)
+ imagery_offset_db (34908)
+ jna (34908)
+ junctionchecking (34977)
+ kaartvalidation (1554390132)
+ mapdust (${version.entry.commit.revision})
+ markseen (13)
+ openqa (1556288504)
+ osm-obj-info (51)
+ reverter (34977)
+ rex (53)
+ terracer (34977)
+ todo (30306)
+ utilsplugin2 (34977)

Map paint styles:
+ ${HOME}/workspace/osm/JOSM Paint Styles and Presets/Kaart-Styles.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Streets&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/DestinationSignRelation&zip=1
+ https://raw.githubusercontent.com/species/josm-preset-traffic_sign_direction/master/direction.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1
+ https://raw.githubusercontent.com/OpenSidewalks/OpenSidewalks-Schema/master/open_sidewalks.mapcss

Validator rules:
+ ${HOME}/workspace/osm/kaart.validator.mapcss

Last errors/warnings:
- W: Expecting test '{0.key} is always in short tons (st)' (i.e., [*[maxweight][maxweight'REGEX'^[0-9.]+$][ParameterFunction~inside(class org.openstreetmap.josm.gui.mappaint.Environment,class java.lang.String <US>)], *[maxaxleload][maxaxleload'REGEX'^[0-9.]+$][ParameterFunction~inside(class org.openstreetmap.josm.gui.mappaint.Environment,class java.lang.String <US>)]]) to match way highway=residential maxweight=5.0 (i.e., TagMap[highway=residential,maxweight=5.0])
- W: Expecting test '{0.key} is always in short tons (st)' (i.e., [*[maxweight][maxweight'REGEX'^[0-9.]+$][ParameterFunction~inside(class org.openstreetmap.josm.gui.mappaint.Environment,class java.lang.String <US>)], *[maxaxleload][maxaxleload'REGEX'^[0-9.]+$][ParameterFunction~inside(class org.openstreetmap.josm.gui.mappaint.Environment,class java.lang.String <US>)]]) to match way highway=residential maxweight=5 (i.e., TagMap[highway=residential,maxweight=5])
- W: Expecting test '{0.key} is always in short tons (st)' (i.e., [*[maxweight][maxweight'REGEX'^[0-9.]+$][ParameterFunction~inside(class org.openstreetmap.josm.gui.mappaint.Environment,class java.lang.String <US>)], *[maxaxleload][maxaxleload'REGEX'^[0-9.]+$][ParameterFunction~inside(class org.openstreetmap.josm.gui.mappaint.Environment,class java.lang.String <US>)]]) to match way highway=residential maxweight=5.0 (i.e., TagMap[highway=residential,maxweight=5.0])
- W: Expecting test '{0.key} is always in short tons (st)' (i.e., [*[maxweight][maxweight'REGEX'^[0-9.]+$][ParameterFunction~inside(class org.openstreetmap.josm.gui.mappaint.Environment,class java.lang.String <US>)], *[maxaxleload][maxaxleload'REGEX'^[0-9.]+$][ParameterFunction~inside(class org.openstreetmap.josm.gui.mappaint.Environment,class java.lang.String <US>)]]) to match way highway=residential maxweight=5 (i.e., TagMap[highway=residential,maxweight=5])
- W: Expecting test '{0.key} is always in short tons (st)' (i.e., [*[maxweight][maxweight'REGEX'^[0-9.]+$][ParameterFunction~inside(class org.openstreetmap.josm.gui.mappaint.Environment,class java.lang.String <US>)], *[maxaxleload][maxaxleload'REGEX'^[0-9.]+$][ParameterFunction~inside(class org.openstreetmap.josm.gui.mappaint.Environment,class java.lang.String <US>)]]) to match way highway=residential maxweight=5.0 (i.e., TagMap[highway=residential,maxweight=5.0])
- W: Expecting test '{0.key} is always in short tons (st)' (i.e., [*[maxweight][maxweight'REGEX'^[0-9.]+$][ParameterFunction~inside(class org.openstreetmap.josm.gui.mappaint.Environment,class java.lang.String <US>)], *[maxaxleload][maxaxleload'REGEX'^[0-9.]+$][ParameterFunction~inside(class org.openstreetmap.josm.gui.mappaint.Environment,class java.lang.String <US>)]]) to match way highway=residential maxweight=5 (i.e., TagMap[highway=residential,maxweight=5])
- W: Expecting test 'Avoid using unicode ' in names (‘’) ({0.key})' (i.e., [*[name'REGEX'.*([‘’']+).*]]) to not match way name=""Testing's Road"" (i.e., TagMap[name=Testing's Road])
- W: Expecting test '{0.key} is always in short tons (st)' (i.e., [*[maxweight][maxweight'REGEX'^[0-9.]+$][ParameterFunction~inside(class org.openstreetmap.josm.gui.mappaint.Environment,class java.lang.String <US>)], *[maxaxleload][maxaxleload'REGEX'^[0-9.]+$][ParameterFunction~inside(class org.openstreetmap.josm.gui.mappaint.Environment,class java.lang.String <US>)]]) to match way highway=residential maxweight=5.0 (i.e., TagMap[highway=residential,maxweight=5.0])
- W: Expecting test '{0.key} is always in short tons (st)' (i.e., [*[maxweight][maxweight'REGEX'^[0-9.]+$][ParameterFunction~inside(class org.openstreetmap.josm.gui.mappaint.Environment,class java.lang.String <US>)], *[maxaxleload][maxaxleload'REGEX'^[0-9.]+$][ParameterFunction~inside(class org.openstreetmap.josm.gui.mappaint.Environment,class java.lang.String <US>)]]) to match way highway=residential maxweight=5 (i.e., TagMap[highway=residential,maxweight=5])
- E: Thread main-worker-0 raised java.lang.IllegalArgumentException: bytes must be >= 0
}}}
"	enhancement	closed	normal	23.06	Core validator		fixed	template_report mapcss	
