Unified · Split
| @@ -4,11 +4,19 @@ module Docs · 3 unmodified lines | ||
| 4 | 4 | def call |
| 5 | 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 | 15 | css('.docstring', 'div:not([class])').each do |node| |
| 8 | 16 | node.before(node.children).remove |
| 9 | 17 | end |
| 10 | 18 | |
| 11 | − css('.docstring-header').each do |node| | |
| 19 | + css('.docstring-header', 'header').each do |node| | |
| 12 | 20 | node.name = 'h3' |
| 13 | 21 | node.children.each { |child| child.remove if child.text? } |
| 14 | 22 | node.remove_attribute('class') |