Method: MaRuKu::Out::HTML#to_html_inline_code

Defined in:
lib/maruku/output/to_html.rb

#to_html_inline_codeObject



615
616
617
618
619
620
621
622
623
624
625
# File 'lib/maruku/output/to_html.rb', line 615

def to_html_inline_code
  code_attrs = {}
  source = xtext(self.raw_code)

  color = get_setting(:code_background_color)
  if color != MaRuKu::Globals[:code_background_color]
    code_attrs['style'] = "background-color: #{color};" + (code_attrs['style'] || "")
  end

  html_element('code', source, code_attrs)
end