Opened 7 years ago

Last modified 7 years ago

#17358 closed defect

mapcss regular expression matches for key — at Version 2

Reported by: maxerickson@… Owned by: team
Priority: normal Milestone: 19.02
Component: Core Version:
Keywords: regression Cc: michael2402

Description (last modified by Klumbumbus)

Between 14460 and 14469, regular expressions for keys in the validator stopped working. Given simple data like (the only part used for the example tests is "name=Test St"):

<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.6' generator='JOSM'>
  <node id='-160658' action='modify' visible='true' lat='25.49069474072' lon='-80.4196570082' />
  <node id='-160660' action='modify' visible='true' lat='25.4906898985' lon='-80.41959934071' />
  <way id='-160661' action='modify' visible='true'>
    <nd ref='-160658' />
    <nd ref='-160660' />
    <tag k='highway' v='residential' />
    <tag k='name' v='Test St' />
  </way>
</osm>

A selector like [/^name/] has stopped working:

*[name=~/Test/]{
  throwWarning: "Value match";
}

*[/name/=~/Test/]{
  throwWarning: "Simple key value match.";
}

*[/^name/=~/Test/]{
  throwWarning: "Key value match";
}

In 14460, the "Key value match" test warns, in 14469 it does not. The other 2 work in both.

Probably related to the work on #17021.

Change History (2)

comment:1 by GerdP, 7 years ago

Thanks for the detailed report.
Yes, it seems that the routines which create the index don't "understand" the meaning of the last rule. If I got that right the problem is the same when such a selector is used for rendering.
I don't yet know where this has to be fixed and I am currently too sick to dig deeper into this :(

Last edited 7 years ago by Don-vip (previous) (diff)

comment:2 by Klumbumbus, 7 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.