Ignore:
Timestamp:
2017-02-28T21:38:41+01:00 (8 years ago)
Author:
Klumbumbus
Message:

fix #14427 - allow negative .5 increments in level tag, asserts, docu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/data/validator/numeric.mapcss

    r11338 r11640  
    2323  assertNoMatch: "node layer=0";
    2424  assertNoMatch: "node layer=2";
    25   assertNoMatch: "node layer=+5";
     25  assertNoMatch: "node layer=+5"; /* this is an invalid value, but this case is already covered by the previous rule */
    2626}
    2727
    2828*[building:levels][building:levels !~ /^(([0-9]|[1-9][0-9]*)(\.5)?)$/],
    29 *[level][level !~ /^((([0-9]|-[1-9])|[1-9][0-9]*)(\.5)?)(;(([0-9]|-[1-9])|[1-9][0-9]*)(\.5)?)*$|^-0\.5$/] {
     29*[level][level !~ /^((((-*[1-9]|[0-9])|-*[1-9][0-9]*)(\.5)?)|-0\.5)(;((((-*[1-9]|[0-9])|-*[1-9][0-9]*)(\.5)?)|-0\.5))*$/] { /* all numbers from -∞ to ∞ in 0.5 steps, optional multiple values seperated by a ; */
    3030  throwWarning: tr("{0} should have numbers only with optional .5 increments", "{0.key}");
    3131  assertMatch: "node level=one";
     32  assertMatch: "node level=01";
     33  assertMatch: "node level=-03";
     34  assertMatch: "node level=-01.5";
     35  assertMatch: "node level=2.3";
     36  assertMatch: "node level=-0";
    3237  assertNoMatch: "node level=0";
    3338  assertNoMatch: "node level=1";
     
    3540  assertNoMatch: "node level=-0.5";
    3641  assertNoMatch: "node level=1.5";
     42  assertNoMatch: "node level=12";
     43  assertNoMatch: "node level=0;1";
     44  assertNoMatch: "node level=1;1.5";
     45  assertNoMatch: "node level=1;0.5";
     46  assertNoMatch: "node level=0;-0.5";
     47  assertNoMatch: "node level=-0.5;0";
     48  assertNoMatch: "node level=-1;-0.5";
    3749  assertNoMatch: "node building:levels=1.5";
    3850  assertMatch: "node building:levels=-1";
    39   assertNoMatch: "node building:levels=0";
     51  assertNoMatch: "node building:levels=0"; /* valid because there can be building:levels:underground > 0 or roof:levels > 0 */
    4052}
    4153
Note: See TracChangeset for help on using the changeset viewer.