__repr__ for font-face rule

This commit is contained in:
Kovid Goyal 2014-06-07 20:57:11 +05:30
parent 70ec3dba42
commit 8ec267ae38

View File

@ -7,7 +7,7 @@ __license__ = 'GPL v3'
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
from .css21 import CSS21Parser, ParseError
from tinycss.css21 import CSS21Parser, ParseError
class FontFaceRule(object):
@ -18,6 +18,10 @@ class FontFaceRule(object):
self.line = line
self.column = column
def __repr__(self):
return ('<{0.__class__.__name__} at {0.line}:{0.column}>'
.format(self))
class CSSFonts3Parser(CSS21Parser):
''' Parse @font-face rules from the CSS 3 fonts module '''