Beispiel #1
0
 def __init__(self, **options):
     HtmlFormatter.__init__(self, **options)
     self.hl_lines = {None: self.hl_lines}
     if isinstance(options.get('css_lines'), dict):
         for k, lines in options['css_lines'].items():
             self.hl_lines[k] = set()
             for lineno in lines:
                 try:
                     self.hl_lines[k].add(int(lineno))
                 except ValueError:
                     pass
Beispiel #2
0
	def __init__(self, **options):
		HtmlFormatter.__init__(self, **options)
		self.matched_terms = options["matched_terms"] if "matched_terms" in options else []
		self.matched_terms = [token.lower() for term in self.matched_terms for token in term.split(".")]
		h_terms = []
		for term in self.matched_terms:
			if "." in term:
				for token in term.split("."):
					h_terms.append(token)
			else:
				h_terms.append(term)
		self.matched_terms = h_terms
 def __init__(self, **options):
     HtmlFormatter.__init__(self, **options)