summaryrefslogtreecommitdiff
path: root/pygments/formatters/rtf.py
diff options
context:
space:
mode:
authorgbrandl <devnull@localhost>2006-12-16 09:12:00 +0100
committergbrandl <devnull@localhost>2006-12-16 09:12:00 +0100
commit0ef0ea74d32fd433fd4c19225f73116c80dfb56e (patch)
treef29540f08a174fbd5676b9f11181177b29b53734 /pygments/formatters/rtf.py
parent4acde39a9b1c9b11a02bea90923b5f6678eb6c26 (diff)
downloadpygments-0ef0ea74d32fd433fd4c19225f73116c80dfb56e.tar.gz
[svn] Add a few example files.
Diffstat (limited to 'pygments/formatters/rtf.py')
-rw-r--r--pygments/formatters/rtf.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/pygments/formatters/rtf.py b/pygments/formatters/rtf.py
index 70c12e66..b7030857 100644
--- a/pygments/formatters/rtf.py
+++ b/pygments/formatters/rtf.py
@@ -30,8 +30,6 @@ class RtfFormatter(Formatter):
specification claims that ``\fmodern`` are "Fixed-pitch serif
and sans serif fonts". Hope every RTF implementation thinks
the same about modern...
-
-
"""
Formatter.__init__(self, **options)
self.fontface = options.get('fontface') or ''
@@ -53,7 +51,7 @@ class RtfFormatter(Formatter):
if isinstance(text, str):
for c in xrange(128, 256):
text = text.replace(chr(c), '\\\'%x' % c)
-
+
# unicode strings
elif isinstance(text, unicode):
buf = []
@@ -74,7 +72,7 @@ class RtfFormatter(Formatter):
outfile.write(r'{\rtf1\ansi\deff0'
r'{\fonttbl{\f0\fmodern\fprq1\fcharset0%s;}}{\colortbl;' %
(self.fontface and ' ' + self._escape(self.fontface) or ''))
-
+
# convert colors and save them in a mapping to access them later.
color_mapping = {}
offset = 1