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

Fallback to a default code_highlight() theme if RStudio theme is unavailable #482

Merged
merged 3 commits into from
Aug 19, 2022

Conversation

rossellhayes
Copy link
Contributor

If code_theme_default_rstudio() is unavailable, code_highlight() falls back to code_theme_default_term():

Screen Shot 2022-06-15 at 12 34 06 PM

I opted to use the default terminal theme instead of an RStudio theme, because the existing RStudio themes were probably designed with a specific background color in mind.

I also preserved the existing warning message if the theme is unrecognized, but this could be removed if it is no longer considered necessary.

Closes #481.

@gaborcsardi gaborcsardi merged commit dd0e6df into r-lib:main Aug 19, 2022
@gaborcsardi
Copy link
Member

Thanks! I added an option to suppress the warning.

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.

Feature request: fallback to a default code_highlight() theme if RStudio theme is unavailable
2 participants