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

Update syntax highlight styles #882

Merged
merged 2 commits into from Aug 14, 2020

Conversation

lornajane
Copy link
Contributor

Looking at #761 and digging around in the codebase, I found pygments2style.py which does indeed contain the code that takes in whatever pygments styles are on your computer and turn them into rst2pdf styles. So I've started by dumping the output of that into this branch, it needs more testing and also some investigation into what's now available in pygments that we might not already have support for in rst2pdf.

@lornajane
Copy link
Contributor Author

Updated to say that the newly generated/updated styles do seem to work pretty well. Going to put this PR to not-draft status in case anyone else has an opinion on what else we should do before merging. I'll add a list of styles to the documentation I think as I'm not sure how else they can be discovered.

@lornajane lornajane marked this pull request as ready for review July 6, 2020 19:19
* ``autumn``
* ``borland``
* ``bw``
* ``colorful``
* ``default``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this style picked up as the default colour scheme if the user doesn't explicitly choose another one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this seems to be our default as well as the pygments default style (which is updated by this PR). I get the same output with and without the "default" stylesheet.

@lornajane
Copy link
Contributor Author

Rebased to eliminate conflicts from style fixes

@lornajane lornajane requested a review from akrabat August 14, 2020 08:03
@lornajane lornajane changed the title [WIP] Update syntax highlight styles Update syntax highlight styles Aug 14, 2020
@lornajane
Copy link
Contributor Author

Do we need to do anything else before we can merge this styles PR?

@akrabat akrabat closed this in edc2e65 Aug 14, 2020
@akrabat akrabat merged commit edc2e65 into rst2pdf:master Aug 14, 2020
@akrabat akrabat added this to the 1.0 milestone Aug 14, 2020
akrabat added a commit to stephenfin/rst2pdf that referenced this pull request Aug 14, 2020
Fixed ordering and added change entry for rst2pdf#882 that was missed when it
was merged.
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

2 participants