Skip to content

Commit

Permalink
Apply fix for #1111, #2607
Browse files Browse the repository at this point in the history
  • Loading branch information
Anteru committed Apr 27, 2024
1 parent 67792d1 commit 544e58c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES
Expand Up @@ -56,6 +56,8 @@ Version 2.18.0
``.. versionadded::`` directive in the docstring (#2589)
- The ``url`` attribute is now required for built-in lexers and
has been added to all existing lexers (#2588)
- The RTF formatter supports line number and line highlighting now (#1217, #2654)
- Add ``\sa0`` keyword in the RTF formatter (#1111, #2607)

Version 2.17.2
--------------
Expand Down
2 changes: 1 addition & 1 deletion pygments/formatters/rtf.py
Expand Up @@ -266,7 +266,7 @@ def _rtf_header(self):
lines.append('}')

# font and fontsize
lines.append('\\f0')
lines.append('\\f0\\sa0')
if self.fontsize:
lines.append('\\fs%d' % self.fontsize)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_rtf_formatter.py
Expand Up @@ -168,7 +168,7 @@ class TestStyle(Style):
r'\red0\green255\blue0;' + '\n'
r'\red0\green0\blue255;' + '\n'
r'}' + '\n'
r'\f0' + '\n'
r'\f0\sa0' + '\n'
r'\dntblnsbdb' + '\n'
r'{\cf1 1 }{\cf3 s} = {\cf2 "}{\cf2 line1}{\cf2 \\n}{\cf2 line2}{\cf2 "}\par' + '\n'
r'}' + '\n')
Expand Down

0 comments on commit 544e58c

Please sign in to comment.