jejacks0n / apitome

Apitome: /iˈpitəmē/ An API documentation presentation layer for RSpec API Documentation output.
250 stars 126 forks source link

code_theme not respecting underscore #119

Open PhilTee opened 4 years ago

PhilTee commented 4 years ago

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.