diff --git a/app/views/api_settings/index.html.erb b/app/views/api_settings/index.html.erb index 7defd3c2..c5a761a8 100644 --- a/app/views/api_settings/index.html.erb +++ b/app/views/api_settings/index.html.erb @@ -53,7 +53,7 @@ <%= render 'shared/clipboard_copy', icon: 'copy', text:, class: 'btn btn-ghost text-white', icon_class: 'w-6 h-6 text-white', copy_title: t('copy'), copied_title: t('copied') %> -
<%= text %>
+
<%== HighlightCode.call(text, 'Shell', theme: 'base16.dark') %>
@@ -79,7 +79,7 @@ <%= render 'shared/clipboard_copy', icon: 'copy', text:, class: 'btn btn-ghost text-white', icon_class: 'w-6 h-6 text-white', copy_title: t('copy'), copied_title: t('copied') %> -
<%= text %>
+
<%== HighlightCode.call(text, 'Shell', theme: 'base16.dark') %>
@@ -101,7 +101,7 @@ <%= render 'shared/clipboard_copy', icon: 'copy', text:, class: 'btn btn-ghost text-white', icon_class: 'w-6 h-6 text-white', copy_title: t('copy'), copied_title: t('copied') %> -
<%= text %>
+
<%== HighlightCode.call(text, 'Shell', theme: 'base16.dark') %>
diff --git a/config/initializers/rouge.rb b/config/initializers/rouge.rb index bf00d89a..e2c69ce7 100644 --- a/config/initializers/rouge.rb +++ b/config/initializers/rouge.rb @@ -8,6 +8,7 @@ module Rouge module Lexers autoload :JSON, 'rouge/lexers/json' + autoload :Shell, 'rouge/lexers/shell' end autoload :Formatter, 'rouge/formatter'