Allow camel-case DOM elements defined in SVG-1.1

The SVG standard defines several DOM elements in camel-case (namely
textPath, altGlyph, altGlyphDef, altGlyphItem and glyphRef). Even though
most browser also accept lower-case, the lexer should take this into
account.
This commit is contained in:
Sascha Peilicke
2013-08-08 10:53:46 +02:00
parent 81c4e765d6
commit a80cb8942a
4 changed files with 14 additions and 3 deletions

View File

@@ -129,7 +129,7 @@ class LessLexer:
elif v in css.propertys:
t.type = 'css_property'
t.value = t.value.strip()
elif v.lower() in dom.html:
elif v in dom.html or v.lower() in dom.html:
t.type = 'css_dom'
elif c == '@':
v = v.lower()

View File

@@ -51,3 +51,12 @@ tspan {
text tspan {
font-weight: bold;
}
textPath {
font-weight: bold;
}
text textPath {
font-weight: bold;
}
svg text textPath {
font-weight: bold;
}

View File

@@ -13,3 +13,6 @@ tref{font-weight:bold;}
text tref{font-weight:bold;}
tspan{font-weight:bold;}
text tspan{font-weight:bold;}
textPath{font-weight:bold;}
text textPath{font-weight:bold;}
svg text textPath{font-weight:bold;}

View File

@@ -33,7 +33,6 @@ tref { font-weight: bold; }
text tref { font-weight: bold; }
tspan { font-weight: bold; }
text tspan { font-weight: bold; }
/* NOTE(saschpe): TODO
textPath { font-weight: bold; }
text textPath { font-weight: bold; }
svg text textPath { font-weight: bold; } */
svg text textPath { font-weight: bold; }