aboutsummaryrefslogtreecommitdiff
path: root/docs/_templates/genindex.html
diff options
context:
space:
mode:
authorRapptz <[email protected]>2019-06-28 21:29:43 -0400
committerRapptz <[email protected]>2019-06-28 21:29:43 -0400
commitab00bc06868e658224ce92508d703540051f5004 (patch)
tree369afff2bee1fdf0b9cc7c3d120727f46c214fbc /docs/_templates/genindex.html
parentMake the generated index page more useful for Ctrl + F. (diff)
downloaddiscord.py-ab00bc06868e658224ce92508d703540051f5004.tar.xz
discord.py-ab00bc06868e658224ce92508d703540051f5004.zip
Strip discord.ext in genindex page and unbreak PEP links.
Diffstat (limited to 'docs/_templates/genindex.html')
-rw-r--r--docs/_templates/genindex.html8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/_templates/genindex.html b/docs/_templates/genindex.html
index e16eb36b..4faf370c 100644
--- a/docs/_templates/genindex.html
+++ b/docs/_templates/genindex.html
@@ -9,6 +9,14 @@
// this is pretty finicky but it should work.
for(let el of elements) {
let key = el.getAttribute('href').split('#', 2)[1]
+ if(!key.startsWith('discord.')) {
+ continue;
+ }
+
+ if(key.startsWith('discord.ext.')) {
+ key = key.substr(12); // discord.ext.
+ }
+
if(el.textContent.endsWith('method)') || el.textContent.indexOf('()') !== -1) {
key = key + '()'
}