mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-11-16 19:48:10 +01:00
Update Laravel documentation (5.2.31, 5.1.33)
This commit is contained in:
parent
438e078de2
commit
e2b7004078
5 changed files with 24 additions and 12 deletions
|
@ -1,6 +0,0 @@
|
|||
#= require views/pages/base
|
||||
|
||||
class app.views.LaravelPage extends app.views.BasePage
|
||||
prepare: ->
|
||||
@highlightCode @findAllByTag('pre'), 'php'
|
||||
return
|
|
@ -11,6 +11,7 @@ app.views.CakephpPage =
|
|||
app.views.EmberPage =
|
||||
app.views.ExpressPage =
|
||||
app.views.GoPage =
|
||||
app.views.LaravelPage =
|
||||
app.views.MarionettePage =
|
||||
app.views.MeteorPage =
|
||||
app.views.ModernizrPage =
|
||||
|
|
|
@ -74,5 +74,16 @@ module Docs
|
|||
warn "#{self.class.name} is re-parsing the document" unless ENV['RACK_ENV'] == 'test'
|
||||
super
|
||||
end
|
||||
|
||||
def decode_cloudflare_email(str)
|
||||
mask = "0x#{str[0..1]}".hex | 0
|
||||
result = ''
|
||||
|
||||
str.chars.drop(2).each_slice(2) do |slice|
|
||||
result += "%" + "0#{("0x#{slice.join}".hex ^ mask).to_s(16)}"[-2..-1]
|
||||
end
|
||||
|
||||
URI.decode(result)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,6 +8,12 @@ module Docs
|
|||
other
|
||||
end
|
||||
|
||||
# Remove code highlighting
|
||||
css('pre').each do |node|
|
||||
node.content = node.content
|
||||
node['data-language'] = 'php'
|
||||
end
|
||||
|
||||
doc
|
||||
end
|
||||
|
||||
|
@ -61,9 +67,8 @@ module Docs
|
|||
node.parent.next_element['id'] = node['name']
|
||||
end
|
||||
|
||||
# Remove code highlighting
|
||||
css('pre').each do |node|
|
||||
node.content = node.content
|
||||
css('a.__cf_email__').each do |node|
|
||||
node.replace(decode_cloudflare_email(node['data-cfemail']))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -29,11 +29,12 @@ module Docs
|
|||
|
||||
options[:attribution] = <<-HTML
|
||||
© Taylor Otwell<br>
|
||||
Licensed under the MIT License.
|
||||
Licensed under the MIT License.<br>
|
||||
Laravel is a trademark of Taylor Otwell.
|
||||
HTML
|
||||
|
||||
version '5.2' do
|
||||
self.release = '5.2.24'
|
||||
self.release = '5.2.31'
|
||||
self.root_path = '/api/5.2/index.html'
|
||||
self.initial_paths = %w(/docs/5.2/installation /api/5.2/classes.html)
|
||||
|
||||
|
@ -46,7 +47,7 @@ module Docs
|
|||
end
|
||||
|
||||
version '5.1' do
|
||||
self.release = '5.1.11'
|
||||
self.release = '5.1.33'
|
||||
self.root_path = '/api/5.1/index.html'
|
||||
self.initial_paths = %w(/docs/5.1/installation /api/5.1/classes.html)
|
||||
|
||||
|
|
Loading…
Reference in a new issue