Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add line numbers and line highlighting to the RTF-formatter #2654

Merged
merged 3 commits into from
Apr 27, 2024

Conversation

jonascj
Copy link
Contributor

@jonascj jonascj commented Feb 25, 2024

Finally implemented line numbers and line highlighting as discussed in issue #1217.

Screenshot from 2024-02-25 23-01-27

If desirable, I could use f-strings instead of %-based string formatting while we're at it (maybe capitalize comments). I chose not to because it is not directly related to the issue.

Merging this would cause #2607 to need a minor rewrite. \\sa0 would need to be added to rtf.py#L269

pygments/formatters/rtf.py Outdated Show resolved Hide resolved
tests/test_rtf_formatter.py Show resolved Hide resolved
pygments/formatters/rtf.py Outdated Show resolved Hide resolved
@Anteru Anteru self-assigned this Mar 26, 2024
@Anteru Anteru added the A-formatting area: changes to formatters label Mar 26, 2024
@Anteru Anteru added this to the 2.18.0 milestone Mar 26, 2024
@Anteru Anteru merged commit a5cd0f1 into pygments:master Apr 27, 2024
2 of 6 checks passed
@Anteru
Copy link
Collaborator

Anteru commented Apr 27, 2024

Merged, thanks a lot!

@Anteru Anteru linked an issue Apr 27, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-formatting area: changes to formatters
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Line numbers for rtf output
2 participants