rubychan / coderay

Fast and easy syntax highlighting for selected languages, written in Ruby.
http://coderay.rubychan.de/
Other
847 stars 115 forks source link

adds css class prefixes #221

Open langalex opened 6 years ago

langalex commented 6 years ago

The default CSS potentially clashes with other CSS classes that might be present in an app. This allows you to specify a prefix:

tokens = CodeRay.scan 'x = 1', :ruby
html = tokens.div(css_class_prefix: 'xyz-', css: :class) # => x = <span class="xyz-integer">1</span>