From abf659f5a5170db98f186bdc1295e4425463e5b8 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 5 Feb 2023 09:09:42 +0100 Subject: [PATCH] bash: fix links to index entries Fixes #1921. --- lib/docs/filters/bash/entries.rb | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/lib/docs/filters/bash/entries.rb b/lib/docs/filters/bash/entries.rb index 01348e2c..c22316a2 100644 --- a/lib/docs/filters/bash/entries.rb +++ b/lib/docs/filters/bash/entries.rb @@ -40,21 +40,7 @@ module Docs css('table[class^=index-] td[valign=top] > a').each_slice(2) do |entry_node, section_node| entry_name = entry_node.content - - page = section_node['href'].split('#')[0] - hash = entry_name - - # The Special Parameters page has multiple additional entries which should link to the same paragraph - # Example: the documentation for "$!" is equal to the documentation for "!" - if page == 'special-parameters' - if hash.size > 1 && hash[0] == '$' - hash = hash[1..-1] - end - end - - # Construct path to the page which the index links to - entry_path = page + '#' + hash - + entry_path = entry_node['href'] entries << [entry_name, entry_path, entry_type] end