|
|
@@ -2,7 +2,7 @@ module Docs
|
|
|
class Chai
|
|
|
class CleanHtmlFilter < Filter
|
|
|
def call
|
|
|
- @doc = at_css('.documentation .rendered')
|
|
|
+ @doc = at_css('.documentation .rendered') if at_css('.documentation .rendered')
|
|
|
|
|
|
if root_page?
|
|
|
at_css('h1').content = 'Chai Assertion Library'
|
|
|
@@ -12,9 +12,9 @@ module Docs
|
|
|
node.before(node.children).remove
|
|
|
end
|
|
|
|
|
|
- # Remove code highlighting
|
|
|
css('pre').each do |node|
|
|
|
node.content = node.content
|
|
|
+ node['data-language'] = 'javascript'
|
|
|
end
|
|
|
|
|
|
doc
|