h1 contains a hidden span.app-vsn containing the elixir version. Drop this element before extracting the content.
Unified · Split
| @@ -2,6 +2,7 @@ module Docs · 1 unmodified line | |||
| 2 | class Elixir | 2 | class Elixir |
| 3 | class EntriesFilter < Docs::EntriesFilter | 3 | class EntriesFilter < Docs::EntriesFilter |
| 4 | def get_name | 4 | def get_name |
| 5 | at_css('h1 .app-vsn').remove | ||
| 5 | if current_url.path.start_with?('/getting-started') | 6 | if current_url.path.start_with?('/getting-started') |
| 6 | at_css('h1').content.strip.remove(/\.\z/) | 7 | at_css('h1').content.strip.remove(/\.\z/) |
| 7 | else | 8 | else |