History

Fix all Elixir 1.13 names detected as "Settings"

A partial fix was already included in the initial patch in #1746, but it was only applied to a subset of titles.

Stefan Breunig committed 4 years ago

Commit 2123c191 parent 18a014f1 file · +2 −2Browse files

Unified · Split

lib/docs/filters/elixir/entries.rb+2−2
@@ -3,11 +3,11 @@ module Docs · 2 unmodified lines
3 class EntriesFilter < Docs::EntriesFilter3 class EntriesFilter < Docs::EntriesFilter
4 def get_name4 def get_name
5 css('h1 .app-vsn').remove5 css('h1 .app-vsn').remove
6 name = (at_css('h1 > span') or at_css('h1')).content.strip
6 7
7 if current_url.path.start_with?('/getting-started')8 if current_url.path.start_with?('/getting-started')
8 (at_css('h1 > span') or at_css('h1')).content.strip.remove(/\.\z/)9 name.remove(/\.\z/)
9 else10 else
10 name = at_css('h1').content.strip
11 name = name.split(' ').first unless name.start_with?('mix ') # ecto11 name = name.split(' ').first unless name.start_with?('mix ') # ecto
12 name12 name
13 end13 end