Module: Thredded::MarkdownCoderay

Defined in:
lib/thredded/markdown_coderay.rb,
lib/thredded/markdown_coderay/railtie.rb,
lib/thredded/markdown_coderay/version.rb,
lib/generators/thredded/markdown_coderay/install_generator.rb

Defined Under Namespace

Classes: InstallGenerator, Railtie

Constant Summary collapse

VERSION =
'1.0.0'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.optionsObject

Returns the value of attribute options.



11
12
13
# File 'lib/thredded/markdown_coderay.rb', line 11

def options
  @options
end

Class Method Details

.setup!Object



13
14
15
16
17
18
19
# File 'lib/thredded/markdown_coderay.rb', line 13

def setup!
  assert_pipeline_contains! 'Thredded::HtmlPipeline::KramdownFilter'
  Thredded::HtmlPipeline::KramdownFilter.options.update(options)
  %w[div span code table td ol].each do |tag|
    whitelist_attribute! tag, 'class'
  end
end