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
33 class EntriesFilter < Docs::EntriesFilter
44 def get_name
55 css('h1 .app-vsn').remove
6+ name = (at_css('h1 > span') or at_css('h1')).content.strip
67
78 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/)
910 else
10− name = at_css('h1').content.strip
1111 name = name.split(' ').first unless name.start_with?('mix ') # ecto
1212 name
1313 end