Unified · Split
| @@ -4,11 +4,19 @@ module Docs · 3 unmodified lines | |||
| 4 | def call | 4 | def call |
| 5 | css('> header', '> footer').remove | 5 | css('> header', '> footer').remove |
| 6 | 6 | ||
| 7 | # Julia 1.4+ uses different HTML | ||
| 8 | at_css('h1').content = at_css('h1').content | ||
| 9 | |||
| 10 | if at_css('#documenter-page') | ||
| 11 | @doc.children = at_css('#documenter-page').children | ||
| 12 | end | ||
| 13 | # End 1.4+ specific cleaning | ||
| 14 | |||
| 7 | css('.docstring', 'div:not([class])').each do |node| | 15 | css('.docstring', 'div:not([class])').each do |node| |
| 8 | node.before(node.children).remove | 16 | node.before(node.children).remove |
| 9 | end | 17 | end |
| 10 | 18 | ||
| 11 | css('.docstring-header').each do |node| | 19 | css('.docstring-header', 'header').each do |node| |
| 12 | node.name = 'h3' | 20 | node.name = 'h3' |
| 13 | node.children.each { |child| child.remove if child.text? } | 21 | node.children.each { |child| child.remove if child.text? } |
| 14 | node.remove_attribute('class') | 22 | node.remove_attribute('class') |