Merge pull request #26 from janza/master
Make sure title is set if h_tag_title() is empty
This commit is contained in:
commit
3b4ca84961
|
@ -16,11 +16,12 @@ defmodule Readability.TitleFinder do
|
||||||
case og_title(html_tree) do
|
case og_title(html_tree) do
|
||||||
"" ->
|
"" ->
|
||||||
title = tag_title(html_tree)
|
title = tag_title(html_tree)
|
||||||
|
h_title = h_tag_title(html_tree)
|
||||||
|
|
||||||
if good_title?(title) do
|
if good_title?(title) || h_title == "" do
|
||||||
title
|
title
|
||||||
else
|
else
|
||||||
h_tag_title(html_tree)
|
h_title
|
||||||
end
|
end
|
||||||
title when is_binary(title) ->
|
title when is_binary(title) ->
|
||||||
title
|
title
|
||||||
|
|
Loading…
Reference in New Issue