Class: Epubber::Models::Model

Inherits:
Object
  • Object
show all
Defined in:
lib/epubber/models/model.rb

Direct Known Subclasses

Book, Chapter, Endnotes, Introduction

Instance Method Summary collapse

Instance Method Details

#clean_html(html) ⇒ Object

Because the EPUB format always uses XHTML, let’s make sure things like ‘
` gets transformed to `<br />`.



7
8
9
# File 'lib/epubber/models/model.rb', line 7

def clean_html(html)
  Nokogiri::HTML::DocumentFragment.parse(html).to_xhtml
end