History

elixir: fix NoMethodError and properly categorize Mix tasks

Jasper van Merle committed 7 years ago

Commit f9437b21 parent 4d183ef1 file · +4 −1Browse files

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

Unified · Split

lib/docs/filters/elixir/entries.rb+4−1
@@ -2,7 +2,8 @@ module Docs · 1 unmodified line
2 class Elixir2 class Elixir
3 class EntriesFilter < Docs::EntriesFilter3 class EntriesFilter < Docs::EntriesFilter
4 def get_name4 def get_name
5 at_css('h1 .app-vsn').remove5 css('h1 .app-vsn').remove
6
6 if current_url.path.start_with?('/getting-started')7 if current_url.path.start_with?('/getting-started')
7 at_css('h1').content.strip.remove(/\.\z/)8 at_css('h1').content.strip.remove(/\.\z/)
8 else9 else
@@ -30,6 +31,8 @@ module Docs · 21 unmodified lines
30 else31 else
31 if name.start_with?('Phoenix')32 if name.start_with?('Phoenix')
32 name.split('.')[0..2].join('.')33 name.split('.')[0..2].join('.')
34 elsif name.start_with?('mix ')
35 'Mix Tasks'
33 else36 else
34 name.split('.').first37 name.split('.').first
35 end38 end