Skip to content

Commit 544e58c

Browse files
committed
Apply fix for #1111, #2607
1 parent 67792d1 commit 544e58c

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CHANGES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ Version 2.18.0
5656
``.. versionadded::`` directive in the docstring (#2589)
5757
- The ``url`` attribute is now required for built-in lexers and
5858
has been added to all existing lexers (#2588)
59+
- The RTF formatter supports line number and line highlighting now (#1217, #2654)
60+
- Add ``\sa0`` keyword in the RTF formatter (#1111, #2607)
5961

6062
Version 2.17.2
6163
--------------

pygments/formatters/rtf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def _rtf_header(self):
266266
lines.append('}')
267267

268268
# font and fontsize
269-
lines.append('\\f0')
269+
lines.append('\\f0\\sa0')
270270
if self.fontsize:
271271
lines.append('\\fs%d' % self.fontsize)
272272

tests/test_rtf_formatter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ class TestStyle(Style):
168168
r'\red0\green255\blue0;' + '\n'
169169
r'\red0\green0\blue255;' + '\n'
170170
r'}' + '\n'
171-
r'\f0' + '\n'
171+
r'\f0\sa0' + '\n'
172172
r'\dntblnsbdb' + '\n'
173173
r'{\cf1 1 }{\cf3 s} = {\cf2 "}{\cf2 line1}{\cf2 \\n}{\cf2 line2}{\cf2 "}\par' + '\n'
174174
r'}' + '\n')

0 commit comments

Comments
 (0)