Esempio n. 1
0
 def __init__(
         self,
         stripnl=False,
         stripall=False,
         ensurenl=True,
         tabsize=tabideal,
         encoding=default_encoding,
         **options  # 2021-02-04 patch
 ):
     """Initialize the Python syntax highlighter."""
     PythonLexer.__init__(
         self,
         stripnl=stripnl,
         stripall=stripall,
         ensurenl=ensurenl,
         tabsize=tabsize,
         encoding=default_encoding,
         **options  # 2021-02-04 patch
     )
     self.original_add_filter, self.add_filter = self.add_filter, lenient_add_filter
 def __init__(self, **options):
     PythonLexer.__init__(self, **options)
Esempio n. 3
0
 def __init__(self, offset, delimiter='|'):
     PythonLexer.__init__(self)
     self.offset = offset
     self.delimiter = delimiter  #TODO: use this to escape highlighting when desired