History

Update PHP documentation (up to 7.0.7)

Thibaut Courouble committed 10 years ago

Commit ceccfc01 parent d36962f5 files · +5 −9Browse files

Showing the changes to lib/docs (3 of 5 files). Show all

Unified · Split

3 files
  1. lib/docs/filters/php/clean_html.rb +1 −0
  2. lib/docs/filters/php/entries.rb +1 −1
  3. lib/docs/scrapers/php.rb +2 −2
lib/docs/filters/php/clean_html.rb+1−0
@@ -24,6 +24,7 @@ module Docs · 23 unmodified lines
24 node.name = 'pre'24 node.name = 'pre'
25 node.inner_html = node.inner_html.gsub(br, "\n")25 node.inner_html = node.inner_html.gsub(br, "\n")
26 node.content = node.content26 node.content = node.content
27 node['data-language'] = 'php'
27 end28 end
28 29
29 css('> h2:first-child.title').each do |node|30 css('> h2:first-child.title').each do |node|
lib/docs/filters/php/entries.rb+1−1
@@ -94,7 +94,7 @@ module Docs · 93 unmodified lines
94 end94 end
95 95
96 def get_type96 def get_type
97 return 'Language Reference' if subpath.start_with?('language.')97 return 'Language Reference' if subpath.start_with?('language.') || subpath.start_with?('functions.')
98 return 'PCRE Reference' if subpath.start_with?('regexp.')98 return 'PCRE Reference' if subpath.start_with?('regexp.')
99 99
100 type = at_css('.up').content.strip100 type = at_css('.up').content.strip
lib/docs/scrapers/php.rb+2−2
@@ -4,7 +4,7 @@ module Docs · 3 unmodified lines
4 4
5 self.name = 'PHP'5 self.name = 'PHP'
6 self.type = 'php'6 self.type = 'php'
7 self.release = 'up to 7.0.5'7 self.release = 'up to 7.0.7'
8 self.base_url = 'https://secure.php.net/manual/en/'8 self.base_url = 'https://secure.php.net/manual/en/'
9 self.root_path = 'index.html'9 self.root_path = 'index.html'
10 self.initial_paths = %w(10 self.initial_paths = %w(
@@ -36,7 +36,7 @@ module Docs · 25 unmodified lines
36 options[:only_patterns] = [36 options[:only_patterns] = [
37 /\Alanguage\./,37 /\Alanguage\./,
38 /\Aclass\./,38 /\Aclass\./,
39 /\Afunction\./,39 /\Afunctions?\./,
40 /\Acontrol-structures/,40 /\Acontrol-structures/,
41 /\Aregexp\./,41 /\Aregexp\./,
42 /\Areserved\.exceptions/,42 /\Areserved\.exceptions/,