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

code_theme not respecting underscore #119

Open
PhilTee opened this issue Nov 4, 2020 · 0 comments
Open

code_theme not respecting underscore #119

PhilTee opened this issue Nov 4, 2020 · 0 comments

Comments

@PhilTee
Copy link

PhilTee commented Nov 4, 2020

I've recently run into an issue with code_theme not being recognised correctly.
This is on Rails 5.2.4.4, it seemed to be working correctly on Rails 5.2.3

Using an underscore in the theme for config.code_theme seems to results in an error stating
ActionView::Template::Error (The asset "apitome/highlight_themes/solarized_light.css" is not present in the asset pipeline.

Changing the underscore to a hyphen makes the problem go away.

--- a/config/initializers/apitome.rb
+++ b/config/initializers/apitome.rb
@@ -22,7 +22,7 @@ Apitome.setup do |config|
   # We're using highlight.js (https://github.com/isagalaev/highlight.js) for code highlighting, and it comes with some
   # great themes. You can check http://softwaremaniacs.org/media/soft/highlight/test.html for themes, and enter the
   # theme as lowercase/underscore.
-  config.code_theme = "solarized_light"
+  config.code_theme = "solarized-light"

I've spent a couple of hours tracking this down already, so haven't had the opportunity to do any testing on other versions to isolate the problem.

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

No branches or pull requests

1 participant