Module: Mumukit::ContentType::BaseContentType

Included in:
Html, Markdown, Plain
Defined in:
lib/mumukit/content_type.rb

Instance Method Summary collapse

Instance Method Details

#format_exception(e) ⇒ Object



7
8
9
# File 'lib/mumukit/content_type.rb', line 7

def format_exception(e)
  "#{title e.message}\n#{code e.backtrace.join("\n")}"
end

#to_html(content) ⇒ Object



11
12
13
# File 'lib/mumukit/content_type.rb', line 11

def to_html(content)
  Mumukit::ContentType::Sanitizer.sanitize(htmlize content)&.html_safe
end