Skip to content

feat: syntax highlighting for run this code #121

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

Merged
merged 3 commits into from
Jul 11, 2022
Merged

Conversation

ben-brooker
Copy link
Contributor

Highlighting syntax of runnable code to encourage user to run the code. (Run this code)

Let me know if changes to highlighting theme are required.

TICKET
ISSUE #14

Light mode before:
Screenshot 2022-07-06 at 14 55 20

Light mode after:
Screenshot 2022-07-06 at 14 55 27

Dark mode before:
Screenshot 2022-07-06 at 14 55 37

Dark mode after:
Screenshot 2022-07-06 at 14 55 44

@ben-brooker ben-brooker requested review from ztsorojev and Mim1991 July 6, 2022 14:02
Copy link
Contributor

@ztsorojev ztsorojev left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Comment on lines 186 to 188
<SyntaxHighlighter language="r" style={ocean}>
{examples}
</SyntaxHighlighter>
Copy link
Contributor

Choose a reason for hiding this comment

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

What are other styles that exist?

Is there a way to have more colors (get the functions colored too, etc.)
I am not familiar with R syntax highlighting tho, so someone else might know better or you can check online to see what is the most common 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.

You can see the different styles here, but none of them highlight the functions in R unfortunately

@ben-brooker ben-brooker merged commit d22df62 into main Jul 11, 2022
@ben-brooker ben-brooker deleted the bb/syntax-highlighting branch July 11, 2022 14:54
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