Showing the changes to lib/docs (1 of 10 files). Show all
Unified · Split
| @@ -11,6 +11,7 @@ module Docs · 10 unmodified lines | ||
| 11 | 11 | # Remove chapter and section numbers from title |
| 12 | 12 | title_node = at_css('h1, h2, h3, h4, h5, h6') |
| 13 | 13 | title_node.content = title_node.content.gsub(/(\d+\.?)+/, '').strip |
| 14 | + title_node.name = 'h1' | |
| 14 | 15 | |
| 15 | 16 | # Remove the "D. " from names like "D. Concept Index" and "D. Function Index" |
| 16 | 17 | title_node.content = title_node.content[3..-1] if title_node.content.start_with?("D. ") |
| @@ -56,6 +57,16 @@ module Docs · 39 unmodified lines | ||
| 56 | 57 | node.children = link unless link.nil? |
| 57 | 58 | end |
| 58 | 59 | |
| 60 | + css('tt', 'code', 'table').remove_attr('class') | |
| 61 | + | |
| 62 | + css('tt').each do |node| | |
| 63 | + node.name = 'code' | |
| 64 | + end | |
| 65 | + | |
| 66 | + css('pre').each do |node| | |
| 67 | + node.content = node.content | |
| 68 | + end | |
| 69 | + | |
| 59 | 70 | doc |
| 60 | 71 | end |
| 61 | 72 | end |