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

feat: highlight code syntax in markdown files #1534

Merged
merged 2 commits into from
Nov 1, 2021
Merged

Conversation

lorenzo-cavazzi
Copy link
Member

@lorenzo-cavazzi lorenzo-cavazzi commented Oct 28, 2021

Since we already use highlight.js for highlighting syntax in code files, and Showdown to convert Markdown to HTML, using showdown-highlight allows us to highlight inline code in Markdown file with a coherent color scheme.

The library is very simple, allowing for few personalizations out of the box, but it works well as long as users specify the code language. There are other solutions but they are more complicated and they may result in a different default highlighting scheme for some languages, forcing us to create a customized common color pattern.

Example:

Screenshot_20211028_081930

/deploy
fix #1358

@lorenzo-cavazzi lorenzo-cavazzi requested a review from a team as a code owner October 28, 2021 06:22
@lorenzo-cavazzi lorenzo-cavazzi temporarily deployed to renku-ci-ui-1534 October 28, 2021 06:22 Inactive
@RenkuBot
Copy link
Contributor

You can access the deployment of this PR at https://renku-ci-ui-1534.dev.renku.ch

@lorenzo-cavazzi lorenzo-cavazzi temporarily deployed to renku-ci-ui-1534 October 28, 2021 07:20 Inactive
Copy link
Contributor

@ciyer ciyer left a comment

Choose a reason for hiding this comment

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

Works great, and so easy!

@lorenzo-cavazzi lorenzo-cavazzi merged commit 7a44378 into master Nov 1, 2021
@lorenzo-cavazzi lorenzo-cavazzi deleted the 1358-md-code branch November 1, 2021 10:52
@RenkuBot
Copy link
Contributor

RenkuBot commented Nov 1, 2021

Tearing down the temporary RenkuLab deplyoment for this PR.

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.

Highlight code in markdown files
3 participants