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

Improve highlighting of code samples #1517

Closed
wants to merge 1 commit into from

Conversation

timhoffm
Copy link

  • Add highlighting for the prompt marker in the code samples on the main page. This increases readability of the examples. The chosen color is the same as the one in the docs. It works quite well also on dark background:
    image

  • Refactor the html formatting so that the html tags are automatically generated and don't have to be written manually in the code samples sources.

    format_html() is actually a poor man's pygments, but I did not want to introduce this dependency. However, switching to pygments would be straight forward, if one wants to have full-fledged highlighting at some point in the future.

Add highlighting for the prompt marker in the code samples.

Refactor the html formatting so that the html tags are automatically
generated and don't have to be written manually in the code samples
sources.
@JacobCoffee
Copy link
Member

Closing in favor of #2538 due to inability to push to fork. Commit credits will remain.

Thanks for your contribution all those years ago :)

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.

2 participants