ThirdParty/Pygments/pygments/formatter.py

changeset 5713
6762afd9f963
parent 4697
c2e9bf425554
equal deleted inserted replaced
5712:f0d08bdeacf4 5713:6762afd9f963
3 pygments.formatter 3 pygments.formatter
4 ~~~~~~~~~~~~~~~~~~ 4 ~~~~~~~~~~~~~~~~~~
5 5
6 Base formatter class. 6 Base formatter class.
7 7
8 :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. 8 :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
9 :license: BSD, see LICENSE for details. 9 :license: BSD, see LICENSE for details.
10 """ 10 """
11 11
12 import codecs 12 import codecs
13 13
63 #: option is given. 63 #: option is given.
64 unicodeoutput = True 64 unicodeoutput = True
65 65
66 def __init__(self, **options): 66 def __init__(self, **options):
67 self.style = _lookup_style(options.get('style', 'default')) 67 self.style = _lookup_style(options.get('style', 'default'))
68 self.full = get_bool_opt(options, 'full', False) 68 self.full = get_bool_opt(options, 'full', False)
69 self.title = options.get('title', '') 69 self.title = options.get('title', '')
70 self.encoding = options.get('encoding', None) or None 70 self.encoding = options.get('encoding', None) or None
71 if self.encoding in ('guess', 'chardet'): 71 if self.encoding in ('guess', 'chardet'):
72 # can happen for e.g. pygmentize -O encoding=guess 72 # can happen for e.g. pygmentize -O encoding=guess
73 self.encoding = 'utf-8' 73 self.encoding = 'utf-8'

eric ide

mercurial