File: inline.py

package info (click to toggle)
python-enable 3.3.1-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 10,392 kB
  • ctags: 17,135
  • sloc: cpp: 79,151; python: 29,601; makefile: 2,926; sh: 43
file content (8 lines) | stat: -rw-r--r-- 256 bytes parent folder | download
1
2
3
4
5
6
7
8
""" Parser for inline CSS in style attributes """

def inlineStyle(styleString):
    if len(styleString) == 0:
        return {}
    styles = styleString.split(";")
    rv = dict(style.split(":") for style in styles if len(style) != 0)
    return rv