Strip discord.ext in genindex page and unbreak PEP links.
This commit is contained in:
parent
acda808803
commit
ab00bc0686
8
docs/_templates/genindex.html
vendored
8
docs/_templates/genindex.html
vendored
@ -9,6 +9,14 @@
|
|||||||
// this is pretty finicky but it should work.
|
// this is pretty finicky but it should work.
|
||||||
for(let el of elements) {
|
for(let el of elements) {
|
||||||
let key = el.getAttribute('href').split('#', 2)[1]
|
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) {
|
if(el.textContent.endsWith('method)') || el.textContent.indexOf('()') !== -1) {
|
||||||
key = key + '()'
|
key = key + '()'
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user