Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
prism-rails wraps the Prism.js library in a rails engine for simple use with the asset pipeline
Prism is a lightweight, robust, elegant syntax highlighting library.
Add the following to your application's Gemfile and run bundle install
:
gem 'prism-rails'
Add the following to your Javascript manifest file application.js
:
//= require prism
Add the css for the default styling application.css
:
*= require prism
See Prism and prism-themes for examples.
For a full list of themes see below
//= require prism-plugin/prism-[plugin-name]
If necessary add the following to your application.scss
:
*= require prism-plugin/prism-[plugin-name]
prism-rails 1.6.0 == Prism.js 1.6.0 Every attempt is made to mirror the currently shipping Prism.js version number wherever possible. The major, minor, and patch version numbers will always represent the Prism.js version. Should a gem bug be discovered, a 4th version identifier will be added and incremented.
Bug reports and pull requests are welcome on GitHub.
The gem is available as open source under the terms of the MIT License.
Plugin | CSS |
---|---|
autolinker | :white_check_mark: |
autoloader | :x: |
command-line | :white_check_mark: |
copy-to-clipboard | :x: |
custom-class | :x: |
data-uri-highlight | :x: |
diff-highlight | :white_check_mark: |
download-button | :x: |
file-highlight | :x: |
filter-highlight-all | :x: |
highlight-keywords | :x: |
ie8 | :white_check_mark: |
inline-color | :white_check_mark: |
jsonp-highlight | :x: |
keep-markup | :x: |
line-highlight | :white_check_mark: |
line-numbers | :white_check_mark: |
match-braces | :white_check_mark: |
normalize-whitespace | :x: |
previewer-angle | :white_check_mark: |
previewer-base | :white_check_mark: |
previewer-color | :white_check_mark: |
previewer-easing | :white_check_mark: |
previewer-gradient | :white_check_mark: |
previewer-time | :white_check_mark: |
previewers | :white_check_mark: |
remove-initial-line-feed | :x: |
show-invisibles | :white_check_mark: |
show-language | :x: |
toolbar | :white_check_mark: |
treeview | :white_check_mark: |
unescaped-markup | :white_check_mark: |
wpd | :white_check_mark: |
FAQs
Unknown package
We found that prism-rails demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.