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
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
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
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
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)
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|$)')
def __init__(self, *args, **kwargs): NullSmarts.__init__(self, *args, **kwargs) self.last_matched_tag = None