From ab00bc06868e658224ce92508d703540051f5004 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Fri, 28 Jun 2019 21:29:43 -0400 Subject: [PATCH] Strip discord.ext in genindex page and unbreak PEP links. --- docs/_templates/genindex.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/_templates/genindex.html b/docs/_templates/genindex.html index e16eb36b0..4faf370cc 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 + '()' }