History

Fix broken markup on Electron homepage

Thibaut Courouble committed 9 years ago

Commit 1dbbb881 parent 899aee81 file · +8 −4Browse files

Showing the changes to lib/docs (1 of 1 file). Show all

Unified · Split

lib/docs/filters/electron/clean_html.rb+8−4
@@ -4,13 +4,17 @@ module Docs · 3 unmodified lines
4 def call4 def call
5 css('.header-link', 'hr + .text-center', 'hr').remove5 css('.header-link', 'hr + .text-center', 'hr').remove
6 6
7 css('.grid', '.row', '.col-ms-12').each do |node|7 css('.grid', '.row', '.col-ms-12', 'ul.docs-list > ul.docs-list').each do |node|
8 node.before(node.children).remove8 node.before(node.children).remove
9 end9 end
10 10
11 css('h2 > a').each do |node|11 if root_page?
12 node.before(node.children).remove12 doc.child.before('<h1>Electron Documentation</h1>')
13 end if root_page?13
14 css('h2 > a').each do |node|
15 node.before(node.children).remove
16 end
17 end
14 18
15 at_css('h2').name = 'h1' unless at_css('h1')19 at_css('h2').name = 'h1' unless at_css('h1')
16 20