File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -53,19 +53,15 @@ def additional_entries
5353 return [ ] if IGNORE_ENTRIES_PATHS . include? ( subpath . split ( '/' ) . last )
5454
5555 css ( '#synopsis > details > ul > li' ) . each_with_object [ ] do |node , entries |
56- link = node . at_css ( 'a' )
57- name = node . content . strip
58- name . remove! %r{\A (?:module|data|newtype|class|type family m|type)\s +}
59- name . sub! %r{\A \( (.+?)\) } , '\1'
60- name . sub! ( / (?:\: \: (\w +))?.*\z / ) { |_ | $1 ? " (#{ $1} )" : '' }
56+ link = node . at_css ( 'a:not([title])' )
57+ name = link . content
6158
6259 if ADD_SUB_ENTRIES_KEYWORDS . include? ( node . at_css ( '.keyword' ) . try ( :content ) )
6360 node . css ( '.subs > li' ) . each do |sub_node |
6461 sub_link = sub_node . at_css ( 'a' )
6562 next unless sub_link [ 'href' ] . start_with? ( '#' )
66- sub_name = sub_node . content . strip
67- sub_name . remove! %r{\s .*}
68- sub_name . prepend "#{ name } "
63+ sub_name = sub_link . content
64+ sub_name << " (#{ name } )"
6965 entries << [ sub_name , sub_link [ 'href' ] . remove ( '#' ) ]
7066 end
7167 end
You can’t perform that action at this time.
0 commit comments