Skip to content

Commit

Permalink
Changed default title selector to h1
Browse files Browse the repository at this point in the history
h2 and h3 were giving too many false positivies. In the future, we might want to make it slightly more sophisticated.
  • Loading branch information
Valian committed Jan 11, 2024
1 parent 3462c8d commit 0fa58b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/readability/title_finder.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Readability.TitleFinder do
"""

@title_suffix ~r/\s(?:\-|\:\:|\|)\s/
@h_tag_selector "h1, h2, h3"
@h_tag_selector "h1"

@type html_tree :: tuple | list

Expand Down

0 comments on commit 0fa58b5

Please sign in to comment.