mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 22:14:53 +00:00
docs: Handle undefined LINK_SUFFIX
When building the docs with an old sphinx (like e.g. on Debian), this would break links in the search results. This happens because we've nabbed the searchtools.js from a sphinx to add our special handling of short builtins like "and", "end", "cd" (as part of #7757). I don't believe this will change *a lot* in practice, so it's probably still okay, but this hack is still worthwhile. See #7946
This commit is contained in:
parent
981a07d4c7
commit
58885fbd0b
1 changed files with 2 additions and 1 deletions
|
@ -268,7 +268,8 @@ var Search = {
|
|||
} else {
|
||||
// normal html builders
|
||||
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX;
|
||||
linkUrl = item[0] + DOCUMENTATION_OPTIONS.LINK_SUFFIX;
|
||||
// If LINK_SUFFIX is undefined, default to ".html" - I actually don't see this being anything else.
|
||||
linkUrl = item[0] + (DOCUMENTATION_OPTIONS.LINK_SUFFIX || ".html");
|
||||
}
|
||||
listItem.append($('<a/>').attr('href',
|
||||
linkUrl +
|
||||
|
|
Loading…
Reference in a new issue