Fixes #162.
Unified · Split
| @@ -0,0 +1,6 @@ | |||
| 1 | #= require views/pages/base | ||
| 2 | |||
| 3 | class app.views.PhpPage extends app.views.BasePage | ||
| 4 | afterRender: -> | ||
| 5 | @highlightCode @findAllByClass('phpcode'), 'php' | ||
| 6 | return | ||
| @@ -23,8 +23,6 @@ · 22 unmodified lines | |||
| 23 | .classsynopsis > .methodsynopsis, | 23 | .classsynopsis > .methodsynopsis, |
| 24 | .classsynopsis > .fieldsynopsis { margin-left: 1em; } | 24 | .classsynopsis > .fieldsynopsis { margin-left: 1em; } |
| 25 | 25 | ||
| 26 | .phpcode > pre { white-space: normal; } | ||
| 27 | |||
| 28 | blockquote.note { @extend %note; } | 26 | blockquote.note { @extend %note; } |
| 29 | blockquote.note > p { margin-bottom: 0; } | 27 | blockquote.note > p { margin-bottom: 0; } |
| 30 | 28 | ||
| @@ -18,9 +18,12 @@ module Docs · 17 unmodified lines | |||
| 18 | @doc = doc.first_element_child | 18 | @doc = doc.first_element_child |
| 19 | end | 19 | end |
| 20 | 20 | ||
| 21 | # Put code blocks in <pre> tags | 21 | # Remove code highlighting |
| 22 | css('.phpcode > code').each do |node| | 22 | br = /<br\s?\/?>/i |
| 23 | css('.phpcode').each do |node| | ||
| 23 | node.name = 'pre' | 24 | node.name = 'pre' |
| 25 | node.inner_html = node.inner_html.gsub(br, "\n") | ||
| 26 | node.content = node.content | ||
| 24 | end | 27 | end |
| 25 | end | 28 | end |
| 26 | end | 29 | end |
| @@ -27,7 +27,7 @@ module Docs · 26 unmodified lines | |||
| 27 | 'XsltProcessor' => 'XSLT', | 27 | 'XsltProcessor' => 'XSLT', |
| 28 | 'ZipArchive' => 'Zip' } | 28 | 'ZipArchive' => 'Zip' } |
| 29 | 29 | ||
| 30 | %w(APC Directory DOM Gearman Gmagick Imagick mysqli OAuth PDO Reflection | 30 | %w(APC Directory DOM Event Gearman Gmagick Imagick mysqli OAuth PDO Reflection |
| 31 | Session SimpleXML Solr Sphinx SQLite3 Varnish XSLT Yaf).each do |str| | 31 | Session SimpleXML Solr Sphinx SQLite3 Varnish XSLT Yaf).each do |str| |
| 32 | TYPE_BY_NAME_STARTS_WITH[str] = str | 32 | TYPE_BY_NAME_STARTS_WITH[str] = str |
| 33 | end | 33 | end |
| @@ -2,7 +2,7 @@ module Docs · 1 unmodified line | |||
| 2 | class Php < FileScraper | 2 | class Php < FileScraper |
| 3 | self.name = 'PHP' | 3 | self.name = 'PHP' |
| 4 | self.type = 'php' | 4 | self.type = 'php' |
| 5 | self.version = 'up to 5.6.5' | 5 | self.version = 'up to 5.6.6' |
| 6 | self.base_url = 'http://www.php.net/manual/en/' | 6 | self.base_url = 'http://www.php.net/manual/en/' |
| 7 | self.root_path = 'index.html' | 7 | self.root_path = 'index.html' |
| 8 | self.initial_paths = %w( | 8 | self.initial_paths = %w( |
| @@ -33,7 +33,7 @@ module Docs · 24 unmodified lines | |||
| 33 | /\Areserved\.variables/] | 33 | /\Areserved\.variables/] |
| 34 | 34 | ||
| 35 | BOOKS = %w(apache apc array bc bzip2 calendar classobj ctype curl datetime | 35 | BOOKS = %w(apache apc array bc bzip2 calendar classobj ctype curl datetime |
| 36 | dba dir dom eio errorfunc exec fileinfo filesystem filter ftp funchand | 36 | dba dir dom eio errorfunc event exec fileinfo filesystem filter ftp funchand |
| 37 | gearman geoip gettext gmagick hash http iconv iisfunc image imagick imap | 37 | gearman geoip gettext gmagick hash http iconv iisfunc image imagick imap |
| 38 | info inotify intl json ldap libevent libxml mail mailparse math mbstring | 38 | info inotify intl json ldap libevent libxml mail mailparse math mbstring |
| 39 | mcrypt memcached misc mysqli network oauth openssl outcontrol password | 39 | mcrypt memcached misc mysqli network oauth openssl outcontrol password |