Esempio n. 1
0
 def __init__(self, *args, **kwargs):
     if not hasattr(Smarts, 'regexps_compiled'):
         Smarts.regexps_compiled = True
         Smarts.tag_pat = re.compile(r'<[^>]+>')
         Smarts.closing_tag_pat = re.compile(r'<\s*/[^>]+>')
         Smarts.closing_pat = re.compile(r'<\s*/')
         Smarts.self_closing_pat = re.compile(r'/\s*>')
     NullSmarts.__init__(self, *args, **kwargs)
     self.last_matched_tag = None
Esempio n. 2
0
 def __init__(self, *args, **kwargs):
     if not hasattr(Smarts, 'regexps_compiled'):
         Smarts.regexps_compiled = True
         Smarts.tag_pat = re.compile(r'<[^>]+>')
         Smarts.closing_tag_pat = re.compile(r'<\s*/[^>]+>')
         Smarts.closing_pat = re.compile(r'<\s*/')
         Smarts.self_closing_pat = re.compile(r'/\s*>')
     NullSmarts.__init__(self, *args, **kwargs)
     self.last_matched_tag = None
Esempio n. 3
0
 def __init__(self, *args, **kwargs):
     if not hasattr(Smarts, 'regexps_compiled'):
         Smarts.regexps_compiled = True
         Smarts.tag_pat = re.compile(r'<[^>]+>')
         Smarts.closing_tag_pat = re.compile(r'<\s*/[^>]+>')
         Smarts.closing_pat = re.compile(r'<\s*/')
         Smarts.self_closing_pat = re.compile(r'/\s*>')
         Smarts.complete_attr_pat = re.compile(r'''([a-zA-Z0-9_-]+)\s*=\s*(?:'([^']*)|"([^"]*))$''')
     NullSmarts.__init__(self, *args, **kwargs)
     self.last_matched_tag = None
Esempio n. 4
0
 def __init__(self, *args, **kwargs):
     if not hasattr(Smarts, 'regexps_compiled'):
         Smarts.regexps_compiled = True
         Smarts.tag_pat = re.compile(r'<[^>]+>')
         Smarts.closing_tag_pat = re.compile(r'<\s*/[^>]+>')
         Smarts.closing_pat = re.compile(r'<\s*/')
         Smarts.self_closing_pat = re.compile(r'/\s*>')
         Smarts.complete_attr_pat = re.compile(r'''([a-zA-Z0-9_-]+)\s*=\s*(?:'([^']*)|"([^"]*))$''')
     NullSmarts.__init__(self, *args, **kwargs)
     self.last_matched_tag = self.last_matched_closing_tag = None
Esempio n. 5
0
 def __init__(self, *args, **kwargs):
     if not hasattr(Smarts, "regexps_compiled"):
         Smarts.regexps_compiled = True
         Smarts.tag_pat = re.compile(r"<[^>]+>")
         Smarts.closing_tag_pat = re.compile(r"<\s*/[^>]+>")
         Smarts.closing_pat = re.compile(r"<\s*/")
         Smarts.self_closing_pat = re.compile(r"/\s*>")
         Smarts.complete_attr_pat = re.compile(r"""([a-zA-Z0-9_-]+)\s*=\s*(?:'([^']*)|"([^"]*))$""")
     NullSmarts.__init__(self, *args, **kwargs)
     self.last_matched_tag = None
Esempio n. 6
0
 def __init__(self, *args, **kwargs):
     if not hasattr(Smarts, 'regexps_compiled'):
         Smarts.regexps_compiled = True
         Smarts.complete_attr_pat = re.compile(r'''url\s*\(\s*['"]{0,1}([^)]*)$''')
     NullSmarts.__init__(self, *args, **kwargs)
Esempio n. 7
0
 def __init__(self, *args, **kwargs):
     if not hasattr(Smarts, 'regexps_compiled'):
         Smarts.regexps_compiled = True
         Smarts.complete_attr_pat = re.compile(r'''url\s*\(\s*['"]{0,1}([^)]*)$''')
     NullSmarts.__init__(self, *args, **kwargs)
Esempio n. 8
0
 def __init__(self, *args, **kwargs):
     NullSmarts.__init__(self, *args, **kwargs)
     c = re.compile
     self.escape_scope_pat = c(r'\s+(continue|break|return|pass)(\s|$)')
     self.dedent_pat = c(r'\s+(else|elif|except)(\(|\s|$)')
Esempio n. 9
0
 def __init__(self, *args, **kwargs):
     NullSmarts.__init__(self, *args, **kwargs)
     c = re.compile
     self.escape_scope_pat = c(r'\s+(continue|break|return|pass)(\s|$)')
     self.dedent_pat = c(r'\s+(else|elif|except)(\(|\s|$)')
Esempio n. 10
0
 def __init__(self, *args, **kwargs):
     NullSmarts.__init__(self, *args, **kwargs)
     self.last_matched_tag = None