Don't show styles with two namespaces as global #19
This commit is contained in:
parent
8c717e871c
commit
00664cc90c
|
@ -129,12 +129,12 @@ function fixBoolean(b) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const namespacePattern = /^\s*@namespace\s+([a-zA-Z]+\s+)?url\(\"?http:\/\/www.w3.org\/1999\/xhtml\"?\);?\s*$/;
|
const namespacePattern = /^\s*(@namespace[^;]+;\s*)+$/;
|
||||||
function getApplicableSections(style, url) {
|
function getApplicableSections(style, url) {
|
||||||
var sections = style.sections.filter(function(section) {
|
var sections = style.sections.filter(function(section) {
|
||||||
return sectionAppliesToUrl(section, url);
|
return sectionAppliesToUrl(section, url);
|
||||||
});
|
});
|
||||||
// ignore if it's just a namespace
|
// ignore if it's just namespaces
|
||||||
if (sections.length == 1 && namespacePattern.test(sections[0].code)) {
|
if (sections.length == 1 && namespacePattern.test(sections[0].code)) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user