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

Remove unneeded _format_unencoded_with_lineno function from IRCFormatter #2270

Merged
merged 1 commit into from Nov 13, 2022

Conversation

Ayowel
Copy link
Contributor

@Ayowel Ayowel commented Nov 1, 2022

This PR removes _format_unencoded_with_lineno from IRCFormatter to avoid code duplication and fix a bug where the newline and the linenumber would be inserted too early.

@Anteru
Copy link
Collaborator

Anteru commented Nov 5, 2022

Could you please add a dedicated test which highlights one of the bugs you'd have with that previously?

@Ayowel
Copy link
Contributor Author

Ayowel commented Nov 6, 2022

@Anteru Done, see test_linecount_output. thank you for the comment

The old version would put the line-end \ on a new line instead of at the end. I put two in the example, but one is enough to show the issue. The second \ was part of additional tests I ran that allowed me to simplify my changes as I had made some in anticipation of an issue that doesn't seem to happen in reality.

@Anteru Anteru added this to the 2.14.0 milestone Nov 13, 2022
@Anteru Anteru added the changelog-update Items which need to get mentioned in the changelog label Nov 13, 2022
@Anteru Anteru merged commit 8abbd68 into pygments:master Nov 13, 2022
@Anteru
Copy link
Collaborator

Anteru commented Nov 13, 2022

Thanks for your contribution!

@jeanas jeanas removed the changelog-update Items which need to get mentioned in the changelog label Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants