Fix regex nesting inheritance

master-undefined-tagcontent
Tom MacWright 12 years ago
parent 2fcbdaacfd
commit 25a2940ebc

@ -97,6 +97,9 @@ Object.defineProperty(tree.Filterset.prototype, 'addable', {
if (key + '<=' in this && this[key + '<='].val < value) return false;
return true;
case '=~':
return true;
case '!=':
if (key + '=' in this) return (this[key + '='].val == value) ? false : null;
if (key + '!=' + value in this) return null;

@ -0,0 +1,14 @@
{
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
"Stylesheet": [
"regex_nest.mss"
],
"Layer": [{
"name": "railway",
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
"Datasource": {
"file": "http://tilemill-data.s3.amazonaws.com/test_data/shape_demo.zip",
"type": "shape"
}
}]
}

@ -0,0 +1,6 @@
#railway[foo='bar'] {
[name =~ "East.*"] {
line-color: green;
line-width: 4;
}
}

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map[]>
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" maximum-extent="-20037508.34,-20037508.34,20037508.34,20037508.34">
<Style name="railway" filter-mode="first" >
<Rule>
<Filter>([foo] = 'bar') and ([name].match('East.*'))</Filter>
<LineSymbolizer stroke="#008000" stroke-width="4" />
</Rule>
</Style>
<Layer name="railway"
srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
<StyleName>railway</StyleName>
<Datasource>
<Parameter name="file"><![CDATA[[absolute path]]]></Parameter>
<Parameter name="type"><![CDATA[shape]]></Parameter>
</Datasource>
</Layer>
</Map>
Loading…
Cancel
Save