History

bash: fix links to index entries

Fixes #1921.

Simon Legner committed 3 years ago

Commit abf659f1 parent a262dbc1 file · +1 −15Browse files

Unified · Split

lib/docs/filters/bash/entries.rb+1−15
@@ -40,21 +40,7 @@ module Docs · 39 unmodified lines
4040
4141 css('table[class^=index-] td[valign=top] > a').each_slice(2) do |entry_node, section_node|
4242 entry_name = entry_node.content
43−
44− page = section_node['href'].split('#')[0]
45− hash = entry_name
46−
47− # The Special Parameters page has multiple additional entries which should link to the same paragraph
48− # Example: the documentation for "$!" is equal to the documentation for "!"
49− if page == 'special-parameters'
50− if hash.size > 1 && hash[0] == '$'
51− hash = hash[1..-1]
52− end
53− end
54−
55− # Construct path to the page which the index links to
56− entry_path = page + '#' + hash
57−
43+ entry_path = entry_node['href']
5844 entries << [entry_name, entry_path, entry_type]
5945 end
6046