Showing the changes to lib/docs (2 of 4 files). Show all
Unified · Split
| @@ -8,11 +8,15 @@ module Docs · 7 unmodified lines | ||
| 8 | 8 | end |
| 9 | 9 | |
| 10 | 10 | css('.highlight > pre').each do |node| |
| 11 | − node['class'] = node.parent['class'] | |
| 11 | + node['data-language'] = node.parent['class'][/highlight-source-(\w+)/, 1] | |
| 12 | 12 | node.content = node.content.strip_heredoc.gsub(' ', ' ') |
| 13 | 13 | node.parent.replace(node) |
| 14 | 14 | end |
| 15 | 15 | |
| 16 | + css('pre > code').each do |node| | |
| 17 | + node.before(node.children).remove | |
| 18 | + end | |
| 19 | + | |
| 16 | 20 | doc |
| 17 | 21 | end |
| 18 | 22 | end |
| @@ -8,6 +8,10 @@ module Docs · 7 unmodified lines | ||
| 8 | 8 | node.name = node.name.sub(/\d/) { |i| i.to_i + 1 } |
| 9 | 9 | end |
| 10 | 10 | |
| 11 | + css('a > img').each do |node| | |
| 12 | + node.parent.before(node.parent.children).remove | |
| 13 | + end | |
| 14 | + | |
| 11 | 15 | doc |
| 12 | 16 | end |
| 13 | 17 | end |