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.
pull/1758/head
Stefan Breunig 3 years ago
parent 18a014fc6c
commit 2123c19243

@ -3,11 +3,11 @@ module Docs
class EntriesFilter < Docs::EntriesFilter class EntriesFilter < Docs::EntriesFilter
def get_name def get_name
css('h1 .app-vsn').remove css('h1 .app-vsn').remove
name = (at_css('h1 > span') or at_css('h1')).content.strip
if current_url.path.start_with?('/getting-started') if current_url.path.start_with?('/getting-started')
(at_css('h1 > span') or at_css('h1')).content.strip.remove(/\.\z/) name.remove(/\.\z/)
else else
name = at_css('h1').content.strip
name = name.split(' ').first unless name.start_with?('mix ') # ecto name = name.split(' ').first unless name.start_with?('mix ') # ecto
name name
end end

Loading…
Cancel
Save