瀏覽代碼

Merge pull request #1758 from breunigs/fix-elixir-1.13-title-parsing

Fix all Elixir 1.13 names detected as "Settings"
Simon Legner 3 年之前
父節點
當前提交
9375cb6bbc
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lib/docs/filters/elixir/entries.rb

+ 2 - 2
lib/docs/filters/elixir/entries.rb

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