History

Update Codeception documentation (2.4.0)

Thibaut Courouble committed 8 years ago

Commit 4571b011 parent 95895b14 files · +12 −6Browse files

Showing the changes to lib/docs/filters/codeception (2 of 4 files). Show all

Unified · Split

2 files
  1. lib/docs/filters/codeception/clean_html.rb +6 −0
  2. lib/docs/filters/codeception/entries.rb +1 −1
lib/docs/filters/codeception/clean_html.rb+6−0
@@ -4,6 +4,12 @@ module Docs · 3 unmodified lines
44 def call
55 @doc = doc.at_css('#page')
66
7+ css('.algolia__search-content').remove
8+
9+ css('.algolia__initial-content').each do |node|
10+ node.before(node.children).remove
11+ end
12+
713 while doc.element_children.length == 1
814 doc.first_element_child.before(doc.first_element_child.children).remove
915 end
lib/docs/filters/codeception/entries.rb+1−1
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
22 class Codeception
33 class EntriesFilter < Docs::EntriesFilter
44 def get_name
5− name = (at_css('h1') || at_css('h2')).content
5+ name = (at_css('.js-algolia__initial-content h1') || at_css('.js-algolia__initial-content h2')).content
66
77 if number = subpath[/\A\d+/]
88 name.prepend "#{number.to_i}. "