From 046b81941837518810802061bbb8a7bf91ed5736 Mon Sep 17 00:00:00 2001
From: ChrisLovering
Date: Tue, 25 Oct 2022 20:33:34 +0000
Subject: Deploying to docs from @
python-discord/bot-core@c7a6ddd00eb371759d837aa75fa397c6d5771401 🚀
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
v8.0.0/.buildinfo | 2 +-
v8.0.0/.doctrees/changelog.doctree | Bin 92070 -> 97159 bytes
v8.0.0/.doctrees/development.doctree | Bin 14879 -> 16041 bytes
v8.0.0/.doctrees/environment.pickle | Bin 2682374 -> 2717383 bytes
v8.0.0/.doctrees/index.doctree | Bin 5890 -> 5943 bytes
.../.doctrees/output/botcore.async_stats.doctree | Bin 18861 -> 19583 bytes
v8.0.0/.doctrees/output/botcore.doctree | Bin 61098 -> 64064 bytes
v8.0.0/.doctrees/output/botcore.exts.doctree | Bin 3091 -> 3005 bytes
v8.0.0/.doctrees/output/botcore.site_api.doctree | Bin 65280 -> 68420 bytes
.../.doctrees/output/botcore.utils.caching.doctree | Bin 16603 -> 17138 bytes
.../.doctrees/output/botcore.utils.channel.doctree | Bin 17549 -> 18336 bytes
.../output/botcore.utils.commands.doctree | Bin 10549 -> 10855 bytes
v8.0.0/.doctrees/output/botcore.utils.doctree | Bin 14058 -> 14703 bytes
.../output/botcore.utils.interactions.doctree | Bin 35386 -> 37017 bytes
.../.doctrees/output/botcore.utils.logging.doctree | Bin 18145 -> 18822 bytes
.../.doctrees/output/botcore.utils.members.doctree | Bin 17417 -> 18074 bytes
.../.doctrees/output/botcore.utils.regex.doctree | Bin 9019 -> 9339 bytes
.../output/botcore.utils.scheduling.doctree | Bin 55497 -> 59238 bytes
v8.0.0/_static/basic.css | 47 ++++---
v8.0.0/_static/doctools.js | 130 ++-----------------
v8.0.0/_static/pygments.css | 3 -
v8.0.0/_static/searchtools.js | 74 ++++++++---
v8.0.0/_static/sphinx_highlight.js | 144 +++++++++++++++++++++
v8.0.0/changelog.html | 9 +-
v8.0.0/development.html | 9 +-
v8.0.0/genindex.html | 7 +-
v8.0.0/index.html | 42 +++++-
v8.0.0/index_redirect.html | 3 +-
v8.0.0/output/botcore.async_stats.html | 42 +++++-
v8.0.0/output/botcore.exts.html | 9 +-
v8.0.0/output/botcore.html | 134 +++++++++++++++----
v8.0.0/output/botcore.site_api.html | 84 ++++++++----
v8.0.0/output/botcore.utils.caching.html | 49 +++++--
v8.0.0/output/botcore.utils.channel.html | 49 +++++--
v8.0.0/output/botcore.utils.commands.html | 42 ++++--
v8.0.0/output/botcore.utils.html | 92 +++++++++++--
v8.0.0/output/botcore.utils.interactions.html | 56 ++++++--
v8.0.0/output/botcore.utils.logging.html | 48 +++++--
v8.0.0/output/botcore.utils.members.html | 43 ++++--
v8.0.0/output/botcore.utils.regex.html | 36 +++++-
v8.0.0/output/botcore.utils.scheduling.html | 76 ++++++++---
v8.0.0/py-modindex.html | 7 +-
v8.0.0/search.html | 7 +-
v8.0.0/searchindex.js | 2 +-
v8.0.0/versions.html | 13 +-
45 files changed, 922 insertions(+), 337 deletions(-)
create mode 100644 v8.0.0/_static/sphinx_highlight.js
(limited to 'v8.0.0')
diff --git a/v8.0.0/.buildinfo b/v8.0.0/.buildinfo
index 952ddec5..cdf0842c 100644
--- a/v8.0.0/.buildinfo
+++ b/v8.0.0/.buildinfo
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
-config: f1cfb7e3a098a0c0b1e17ceee8e8ed12
+config: 0ff2557a35dde3db5e493eae903d33cc
tags: 645f666f9bcd5a90fca523b33c5a78b7
diff --git a/v8.0.0/.doctrees/changelog.doctree b/v8.0.0/.doctrees/changelog.doctree
index 3e18618b..968fa061 100644
Binary files a/v8.0.0/.doctrees/changelog.doctree and b/v8.0.0/.doctrees/changelog.doctree differ
diff --git a/v8.0.0/.doctrees/development.doctree b/v8.0.0/.doctrees/development.doctree
index f334a220..97d8a442 100644
Binary files a/v8.0.0/.doctrees/development.doctree and b/v8.0.0/.doctrees/development.doctree differ
diff --git a/v8.0.0/.doctrees/environment.pickle b/v8.0.0/.doctrees/environment.pickle
index 692fe60b..238c448d 100644
Binary files a/v8.0.0/.doctrees/environment.pickle and b/v8.0.0/.doctrees/environment.pickle differ
diff --git a/v8.0.0/.doctrees/index.doctree b/v8.0.0/.doctrees/index.doctree
index 3fbb1ad1..843c7979 100644
Binary files a/v8.0.0/.doctrees/index.doctree and b/v8.0.0/.doctrees/index.doctree differ
diff --git a/v8.0.0/.doctrees/output/botcore.async_stats.doctree b/v8.0.0/.doctrees/output/botcore.async_stats.doctree
index 9ce61154..c16eff77 100644
Binary files a/v8.0.0/.doctrees/output/botcore.async_stats.doctree and b/v8.0.0/.doctrees/output/botcore.async_stats.doctree differ
diff --git a/v8.0.0/.doctrees/output/botcore.doctree b/v8.0.0/.doctrees/output/botcore.doctree
index 9c31baaf..b41e53ed 100644
Binary files a/v8.0.0/.doctrees/output/botcore.doctree and b/v8.0.0/.doctrees/output/botcore.doctree differ
diff --git a/v8.0.0/.doctrees/output/botcore.exts.doctree b/v8.0.0/.doctrees/output/botcore.exts.doctree
index 1e40ada0..b80c6e7e 100644
Binary files a/v8.0.0/.doctrees/output/botcore.exts.doctree and b/v8.0.0/.doctrees/output/botcore.exts.doctree differ
diff --git a/v8.0.0/.doctrees/output/botcore.site_api.doctree b/v8.0.0/.doctrees/output/botcore.site_api.doctree
index 73a31b6d..6c239a93 100644
Binary files a/v8.0.0/.doctrees/output/botcore.site_api.doctree and b/v8.0.0/.doctrees/output/botcore.site_api.doctree differ
diff --git a/v8.0.0/.doctrees/output/botcore.utils.caching.doctree b/v8.0.0/.doctrees/output/botcore.utils.caching.doctree
index dd446e56..3eeda7a9 100644
Binary files a/v8.0.0/.doctrees/output/botcore.utils.caching.doctree and b/v8.0.0/.doctrees/output/botcore.utils.caching.doctree differ
diff --git a/v8.0.0/.doctrees/output/botcore.utils.channel.doctree b/v8.0.0/.doctrees/output/botcore.utils.channel.doctree
index 1b1a208d..0403de97 100644
Binary files a/v8.0.0/.doctrees/output/botcore.utils.channel.doctree and b/v8.0.0/.doctrees/output/botcore.utils.channel.doctree differ
diff --git a/v8.0.0/.doctrees/output/botcore.utils.commands.doctree b/v8.0.0/.doctrees/output/botcore.utils.commands.doctree
index 47f45f6f..3da59581 100644
Binary files a/v8.0.0/.doctrees/output/botcore.utils.commands.doctree and b/v8.0.0/.doctrees/output/botcore.utils.commands.doctree differ
diff --git a/v8.0.0/.doctrees/output/botcore.utils.doctree b/v8.0.0/.doctrees/output/botcore.utils.doctree
index 1c8c36c3..fd322044 100644
Binary files a/v8.0.0/.doctrees/output/botcore.utils.doctree and b/v8.0.0/.doctrees/output/botcore.utils.doctree differ
diff --git a/v8.0.0/.doctrees/output/botcore.utils.interactions.doctree b/v8.0.0/.doctrees/output/botcore.utils.interactions.doctree
index 98d524a1..371f8318 100644
Binary files a/v8.0.0/.doctrees/output/botcore.utils.interactions.doctree and b/v8.0.0/.doctrees/output/botcore.utils.interactions.doctree differ
diff --git a/v8.0.0/.doctrees/output/botcore.utils.logging.doctree b/v8.0.0/.doctrees/output/botcore.utils.logging.doctree
index 6881b948..80da461d 100644
Binary files a/v8.0.0/.doctrees/output/botcore.utils.logging.doctree and b/v8.0.0/.doctrees/output/botcore.utils.logging.doctree differ
diff --git a/v8.0.0/.doctrees/output/botcore.utils.members.doctree b/v8.0.0/.doctrees/output/botcore.utils.members.doctree
index 7b241bbb..af05d815 100644
Binary files a/v8.0.0/.doctrees/output/botcore.utils.members.doctree and b/v8.0.0/.doctrees/output/botcore.utils.members.doctree differ
diff --git a/v8.0.0/.doctrees/output/botcore.utils.regex.doctree b/v8.0.0/.doctrees/output/botcore.utils.regex.doctree
index 9afafa48..5b15102d 100644
Binary files a/v8.0.0/.doctrees/output/botcore.utils.regex.doctree and b/v8.0.0/.doctrees/output/botcore.utils.regex.doctree differ
diff --git a/v8.0.0/.doctrees/output/botcore.utils.scheduling.doctree b/v8.0.0/.doctrees/output/botcore.utils.scheduling.doctree
index 781790de..c202f140 100644
Binary files a/v8.0.0/.doctrees/output/botcore.utils.scheduling.doctree and b/v8.0.0/.doctrees/output/botcore.utils.scheduling.doctree differ
diff --git a/v8.0.0/_static/basic.css b/v8.0.0/_static/basic.css
index 4e9a9f1f..eeb0519a 100644
--- a/v8.0.0/_static/basic.css
+++ b/v8.0.0/_static/basic.css
@@ -236,6 +236,16 @@ div.body p, div.body dd, div.body li, div.body blockquote {
a.headerlink {
visibility: hidden;
}
+a.brackets:before,
+span.brackets > a:before{
+ content: "[";
+}
+
+a.brackets:after,
+span.brackets > a:after {
+ content: "]";
+}
+
h1:hover > a.headerlink,
h2:hover > a.headerlink,
@@ -324,15 +334,11 @@ aside.sidebar {
p.sidebar-title {
font-weight: bold;
}
-nav.contents,
-aside.topic,
div.admonition, div.topic, blockquote {
clear: left;
}
/* -- topics ---------------------------------------------------------------- */
-nav.contents,
-aside.topic,
div.topic {
border: 1px solid #ccc;
padding: 7px;
@@ -371,8 +377,6 @@ div.body p.centered {
div.sidebar > :last-child,
aside.sidebar > :last-child,
-nav.contents > :last-child,
-aside.topic > :last-child,
div.topic > :last-child,
div.admonition > :last-child {
margin-bottom: 0;
@@ -380,8 +384,6 @@ div.admonition > :last-child {
div.sidebar::after,
aside.sidebar::after,
-nav.contents::after,
-aside.topic::after,
div.topic::after,
div.admonition::after,
blockquote::after {
@@ -606,26 +608,19 @@ ol.simple p,
ul.simple p {
margin-bottom: 0;
}
-aside.footnote > span,
-div.citation > span {
+dl.footnote > dt,
+dl.citation > dt {
float: left;
+ margin-right: 0.5em;
}
-aside.footnote > span:last-of-type,
-div.citation > span:last-of-type {
- padding-right: 0.5em;
-}
-aside.footnote > p {
- margin-left: 2em;
-}
-div.citation > p {
- margin-left: 4em;
-}
-aside.footnote > p:last-of-type,
-div.citation > p:last-of-type {
+
+dl.footnote > dd,
+dl.citation > dd {
margin-bottom: 0em;
}
-aside.footnote > p:last-of-type:after,
-div.citation > p:last-of-type:after {
+
+dl.footnote > dd:after,
+dl.citation > dd:after {
content: "";
clear: both;
}
@@ -641,6 +636,10 @@ dl.field-list > dt {
padding-left: 0.5em;
padding-right: 5px;
}
+dl.field-list > dt:after {
+ content: ":";
+}
+
dl.field-list > dd {
padding-left: 0.5em;
diff --git a/v8.0.0/_static/doctools.js b/v8.0.0/_static/doctools.js
index c3db08d1..527b876c 100644
--- a/v8.0.0/_static/doctools.js
+++ b/v8.0.0/_static/doctools.js
@@ -10,6 +10,13 @@
*/
"use strict";
+const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([
+ "TEXTAREA",
+ "INPUT",
+ "SELECT",
+ "BUTTON",
+]);
+
const _ready = (callback) => {
if (document.readyState !== "loading") {
callback();
@@ -18,73 +25,11 @@ const _ready = (callback) => {
}
};
-/**
- * highlight a given string on a node by wrapping it in
- * span elements with the given class name.
- */
-const _highlight = (node, addItems, text, className) => {
- if (node.nodeType === Node.TEXT_NODE) {
- const val = node.nodeValue;
- const parent = node.parentNode;
- const pos = val.toLowerCase().indexOf(text);
- if (
- pos >= 0 &&
- !parent.classList.contains(className) &&
- !parent.classList.contains("nohighlight")
- ) {
- let span;
-
- const closestNode = parent.closest("body, svg, foreignObject");
- const isInSVG = closestNode && closestNode.matches("svg");
- if (isInSVG) {
- span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
- } else {
- span = document.createElement("span");
- span.classList.add(className);
- }
-
- span.appendChild(document.createTextNode(val.substr(pos, text.length)));
- parent.insertBefore(
- span,
- parent.insertBefore(
- document.createTextNode(val.substr(pos + text.length)),
- node.nextSibling
- )
- );
- node.nodeValue = val.substr(0, pos);
-
- if (isInSVG) {
- const rect = document.createElementNS(
- "http://www.w3.org/2000/svg",
- "rect"
- );
- const bbox = parent.getBBox();
- rect.x.baseVal.value = bbox.x;
- rect.y.baseVal.value = bbox.y;
- rect.width.baseVal.value = bbox.width;
- rect.height.baseVal.value = bbox.height;
- rect.setAttribute("class", className);
- addItems.push({ parent: parent, target: rect });
- }
- }
- } else if (node.matches && !node.matches("button, select, textarea")) {
- node.childNodes.forEach((el) => _highlight(el, addItems, text, className));
- }
-};
-const _highlightText = (thisNode, text, className) => {
- let addItems = [];
- _highlight(thisNode, addItems, text, className);
- addItems.forEach((obj) =>
- obj.parent.insertAdjacentElement("beforebegin", obj.target)
- );
-};
-
/**
* Small JavaScript module for the documentation.
*/
const Documentation = {
init: () => {
- Documentation.highlightSearchWords();
Documentation.initDomainIndexTable();
Documentation.initOnKeyListeners();
},
@@ -126,51 +71,6 @@ const Documentation = {
Documentation.LOCALE = catalog.locale;
},
- /**
- * highlight the search words provided in the url in the text
- */
- highlightSearchWords: () => {
- const highlight =
- new URLSearchParams(window.location.search).get("highlight") || "";
- const terms = highlight.toLowerCase().split(/\s+/).filter(x => x);
- if (terms.length === 0) return; // nothing to do
-
- // There should never be more than one element matching "div.body"
- const divBody = document.querySelectorAll("div.body");
- const body = divBody.length ? divBody[0] : document.querySelector("body");
- window.setTimeout(() => {
- terms.forEach((term) => _highlightText(body, term, "highlighted"));
- }, 10);
-
- const searchBox = document.getElementById("searchbox");
- if (searchBox === null) return;
- searchBox.appendChild(
- document
- .createRange()
- .createContextualFragment(
- '' +
- '' +
- Documentation.gettext("Hide Search Matches") +
- "
"
- )
- );
- },
-
- /**
- * helper function to hide the search marks again
- */
- hideSearchWords: () => {
- document
- .querySelectorAll("#searchbox .highlight-link")
- .forEach((el) => el.remove());
- document
- .querySelectorAll("span.highlighted")
- .forEach((el) => el.classList.remove("highlighted"));
- const url = new URL(window.location);
- url.searchParams.delete("highlight");
- window.history.replaceState({}, "", url);
- },
-
/**
* helper function to focus on search bar
*/
@@ -210,15 +110,11 @@ const Documentation = {
)
return;
- const blacklistedElements = new Set([
- "TEXTAREA",
- "INPUT",
- "SELECT",
- "BUTTON",
- ]);
document.addEventListener("keydown", (event) => {
- if (blacklistedElements.has(document.activeElement.tagName)) return; // bail for input elements
- if (event.altKey || event.ctrlKey || event.metaKey) return; // bail with special keys
+ // bail for input elements
+ if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
+ // bail with special keys
+ if (event.altKey || event.ctrlKey || event.metaKey) return;
if (!event.shiftKey) {
switch (event.key) {
@@ -240,10 +136,6 @@ const Documentation = {
event.preventDefault();
}
break;
- case "Escape":
- if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break;
- Documentation.hideSearchWords();
- event.preventDefault();
}
}
diff --git a/v8.0.0/_static/pygments.css b/v8.0.0/_static/pygments.css
index 75471509..053cfd3d 100644
--- a/v8.0.0/_static/pygments.css
+++ b/v8.0.0/_static/pygments.css
@@ -54,7 +54,6 @@
.highlight .nt { color: #204a87; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #000000 } /* Name.Variable */
.highlight .ow { color: #204a87; font-weight: bold } /* Operator.Word */
-.highlight .pm { color: #000000; font-weight: bold } /* Punctuation.Marker */
.highlight .w { color: #f8f8f8 } /* Text.Whitespace */
.highlight .mb { color: #0000cf; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000cf; font-weight: bold } /* Literal.Number.Float */
@@ -139,7 +138,6 @@ body[data-theme="dark"] .highlight .py { color: #d0d0d0 } /* Name.Property */
body[data-theme="dark"] .highlight .nt { color: #6ebf26; font-weight: bold } /* Name.Tag */
body[data-theme="dark"] .highlight .nv { color: #40ffff } /* Name.Variable */
body[data-theme="dark"] .highlight .ow { color: #6ebf26; font-weight: bold } /* Operator.Word */
-body[data-theme="dark"] .highlight .pm { color: #d0d0d0 } /* Punctuation.Marker */
body[data-theme="dark"] .highlight .w { color: #666666 } /* Text.Whitespace */
body[data-theme="dark"] .highlight .mb { color: #51b2fd } /* Literal.Number.Bin */
body[data-theme="dark"] .highlight .mf { color: #51b2fd } /* Literal.Number.Float */
@@ -224,7 +222,6 @@ body:not([data-theme="light"]) .highlight .py { color: #d0d0d0 } /* Name.Propert
body:not([data-theme="light"]) .highlight .nt { color: #6ebf26; font-weight: bold } /* Name.Tag */
body:not([data-theme="light"]) .highlight .nv { color: #40ffff } /* Name.Variable */
body:not([data-theme="light"]) .highlight .ow { color: #6ebf26; font-weight: bold } /* Operator.Word */
-body:not([data-theme="light"]) .highlight .pm { color: #d0d0d0 } /* Punctuation.Marker */
body:not([data-theme="light"]) .highlight .w { color: #666666 } /* Text.Whitespace */
body:not([data-theme="light"]) .highlight .mb { color: #51b2fd } /* Literal.Number.Bin */
body:not([data-theme="light"]) .highlight .mf { color: #51b2fd } /* Literal.Number.Float */
diff --git a/v8.0.0/_static/searchtools.js b/v8.0.0/_static/searchtools.js
index f2fb7d5c..e89e34d4 100644
--- a/v8.0.0/_static/searchtools.js
+++ b/v8.0.0/_static/searchtools.js
@@ -57,14 +57,14 @@ const _removeChildren = (element) => {
const _escapeRegExp = (string) =>
string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
-const _displayItem = (item, highlightTerms, searchTerms) => {
+const _displayItem = (item, searchTerms) => {
const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT;
const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
- const [docName, title, anchor, descr] = item;
+ const [docName, title, anchor, descr, score, _filename] = item;
let listItem = document.createElement("li");
let requestUrl;
@@ -82,10 +82,9 @@ const _displayItem = (item, highlightTerms, searchTerms) => {
requestUrl = docUrlRoot + docName + docFileSuffix;
linkUrl = docName + docLinkSuffix;
}
- const params = new URLSearchParams();
- params.set("highlight", [...highlightTerms].join(" "));
let linkEl = listItem.appendChild(document.createElement("a"));
- linkEl.href = linkUrl + "?" + params.toString() + anchor;
+ linkEl.href = linkUrl + anchor;
+ linkEl.dataset.score = score;
linkEl.innerHTML = title;
if (descr)
listItem.appendChild(document.createElement("span")).innerHTML =
@@ -96,7 +95,7 @@ const _displayItem = (item, highlightTerms, searchTerms) => {
.then((data) => {
if (data)
listItem.appendChild(
- Search.makeSearchSummary(data, searchTerms, highlightTerms)
+ Search.makeSearchSummary(data, searchTerms)
);
});
Search.output.appendChild(listItem);
@@ -116,15 +115,14 @@ const _finishSearch = (resultCount) => {
const _displayNextItem = (
results,
resultCount,
- highlightTerms,
searchTerms
) => {
// results left, load the summary and display it
// this is intended to be dynamic (don't sub resultsCount)
if (results.length) {
- _displayItem(results.pop(), highlightTerms, searchTerms);
+ _displayItem(results.pop(), searchTerms);
setTimeout(
- () => _displayNextItem(results, resultCount, highlightTerms, searchTerms),
+ () => _displayNextItem(results, resultCount, searchTerms),
5
);
}
@@ -237,6 +235,12 @@ const Search = {
* execute search (requires search index to be loaded)
*/
query: (query) => {
+ const filenames = Search._index.filenames;
+ const docNames = Search._index.docnames;
+ const titles = Search._index.titles;
+ const allTitles = Search._index.alltitles;
+ const indexEntries = Search._index.indexentries;
+
// stem the search terms and add them to the correct list
const stemmer = new Stemmer();
const searchTerms = new Set();
@@ -264,6 +268,10 @@ const Search = {
}
});
+ if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js
+ localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" "))
+ }
+
// console.debug("SEARCH: searching for:");
// console.info("required: ", [...searchTerms]);
// console.info("excluded: ", [...excludedTerms]);
@@ -272,6 +280,40 @@ const Search = {
let results = [];
_removeChildren(document.getElementById("search-progress"));
+ const queryLower = query.toLowerCase();
+ for (const [title, foundTitles] of Object.entries(allTitles)) {
+ if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) {
+ for (const [file, id] of foundTitles) {
+ let score = Math.round(100 * queryLower.length / title.length)
+ results.push([
+ docNames[file],
+ titles[file] !== title ? `${titles[file]} > ${title}` : title,
+ id !== null ? "#" + id : "",
+ null,
+ score,
+ filenames[file],
+ ]);
+ }
+ }
+ }
+
+ // search for explicit entries in index directives
+ for (const [entry, foundEntries] of Object.entries(indexEntries)) {
+ if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) {
+ for (const [file, id] of foundEntries) {
+ let score = Math.round(100 * queryLower.length / entry.length)
+ results.push([
+ docNames[file],
+ titles[file],
+ id ? "#" + id : "",
+ null,
+ score,
+ filenames[file],
+ ]);
+ }
+ }
+ }
+
// lookup as object
objectTerms.forEach((term) =>
results.push(...Search.performObjectSearch(term, objectTerms))
@@ -318,7 +360,7 @@ const Search = {
// console.info("search results:", Search.lastresults);
// print the results
- _displayNextItem(results, results.length, highlightTerms, searchTerms);
+ _displayNextItem(results, results.length, searchTerms);
},
/**
@@ -399,8 +441,8 @@ const Search = {
// prepare search
const terms = Search._index.terms;
const titleTerms = Search._index.titleterms;
- const docNames = Search._index.docnames;
const filenames = Search._index.filenames;
+ const docNames = Search._index.docnames;
const titles = Search._index.titles;
const scoreMap = new Map();
@@ -497,11 +539,9 @@ const Search = {
/**
* helper function to return a node containing the
* search summary for a given text. keywords is a list
- * of stemmed words, highlightWords is the list of normal, unstemmed
- * words. the first one is used to find the occurrence, the
- * latter for highlighting it.
+ * of stemmed words.
*/
- makeSearchSummary: (htmlText, keywords, highlightWords) => {
+ makeSearchSummary: (htmlText, keywords) => {
const text = Search.htmlToText(htmlText);
if (text === "") return null;
@@ -519,10 +559,6 @@ const Search = {
summary.classList.add("context");
summary.textContent = top + text.substr(startWithContext, 240).trim() + tail;
- highlightWords.forEach((highlightWord) =>
- _highlightText(summary, highlightWord, "highlighted")
- );
-
return summary;
},
};
diff --git a/v8.0.0/_static/sphinx_highlight.js b/v8.0.0/_static/sphinx_highlight.js
new file mode 100644
index 00000000..aae669d7
--- /dev/null
+++ b/v8.0.0/_static/sphinx_highlight.js
@@ -0,0 +1,144 @@
+/* Highlighting utilities for Sphinx HTML documentation. */
+"use strict";
+
+const SPHINX_HIGHLIGHT_ENABLED = true
+
+/**
+ * highlight a given string on a node by wrapping it in
+ * span elements with the given class name.
+ */
+const _highlight = (node, addItems, text, className) => {
+ if (node.nodeType === Node.TEXT_NODE) {
+ const val = node.nodeValue;
+ const parent = node.parentNode;
+ const pos = val.toLowerCase().indexOf(text);
+ if (
+ pos >= 0 &&
+ !parent.classList.contains(className) &&
+ !parent.classList.contains("nohighlight")
+ ) {
+ let span;
+
+ const closestNode = parent.closest("body, svg, foreignObject");
+ const isInSVG = closestNode && closestNode.matches("svg");
+ if (isInSVG) {
+ span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
+ } else {
+ span = document.createElement("span");
+ span.classList.add(className);
+ }
+
+ span.appendChild(document.createTextNode(val.substr(pos, text.length)));
+ parent.insertBefore(
+ span,
+ parent.insertBefore(
+ document.createTextNode(val.substr(pos + text.length)),
+ node.nextSibling
+ )
+ );
+ node.nodeValue = val.substr(0, pos);
+
+ if (isInSVG) {
+ const rect = document.createElementNS(
+ "http://www.w3.org/2000/svg",
+ "rect"
+ );
+ const bbox = parent.getBBox();
+ rect.x.baseVal.value = bbox.x;
+ rect.y.baseVal.value = bbox.y;
+ rect.width.baseVal.value = bbox.width;
+ rect.height.baseVal.value = bbox.height;
+ rect.setAttribute("class", className);
+ addItems.push({ parent: parent, target: rect });
+ }
+ }
+ } else if (node.matches && !node.matches("button, select, textarea")) {
+ node.childNodes.forEach((el) => _highlight(el, addItems, text, className));
+ }
+};
+const _highlightText = (thisNode, text, className) => {
+ let addItems = [];
+ _highlight(thisNode, addItems, text, className);
+ addItems.forEach((obj) =>
+ obj.parent.insertAdjacentElement("beforebegin", obj.target)
+ );
+};
+
+/**
+ * Small JavaScript module for the documentation.
+ */
+const SphinxHighlight = {
+
+ /**
+ * highlight the search words provided in localstorage in the text
+ */
+ highlightSearchWords: () => {
+ if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight
+
+ // get and clear terms from localstorage
+ const url = new URL(window.location);
+ const highlight =
+ localStorage.getItem("sphinx_highlight_terms")
+ || url.searchParams.get("highlight")
+ || "";
+ localStorage.removeItem("sphinx_highlight_terms")
+ url.searchParams.delete("highlight");
+ window.history.replaceState({}, "", url);
+
+ // get individual terms from highlight string
+ const terms = highlight.toLowerCase().split(/\s+/).filter(x => x);
+ if (terms.length === 0) return; // nothing to do
+
+ // There should never be more than one element matching "div.body"
+ const divBody = document.querySelectorAll("div.body");
+ const body = divBody.length ? divBody[0] : document.querySelector("body");
+ window.setTimeout(() => {
+ terms.forEach((term) => _highlightText(body, term, "highlighted"));
+ }, 10);
+
+ const searchBox = document.getElementById("searchbox");
+ if (searchBox === null) return;
+ searchBox.appendChild(
+ document
+ .createRange()
+ .createContextualFragment(
+ '' +
+ '' +
+ _("Hide Search Matches") +
+ "
"
+ )
+ );
+ },
+
+ /**
+ * helper function to hide the search marks again
+ */
+ hideSearchWords: () => {
+ document
+ .querySelectorAll("#searchbox .highlight-link")
+ .forEach((el) => el.remove());
+ document
+ .querySelectorAll("span.highlighted")
+ .forEach((el) => el.classList.remove("highlighted"));
+ localStorage.removeItem("sphinx_highlight_terms")
+ },
+
+ initEscapeListener: () => {
+ // only install a listener if it is really needed
+ if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return;
+
+ document.addEventListener("keydown", (event) => {
+ // bail for input elements
+ if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
+ // bail with special keys
+ if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;
+ if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) {
+ SphinxHighlight.hideSearchWords();
+ event.preventDefault();
+ }
+ });
+ },
+};
+
+_ready(SphinxHighlight.highlightSearchWords);
+_ready(SphinxHighlight.initEscapeListener);
diff --git a/v8.0.0/changelog.html b/v8.0.0/changelog.html
index a8207f92..e91a5ee1 100644
--- a/v8.0.0/changelog.html
+++ b/v8.0.0/changelog.html
@@ -2,10 +2,10 @@
-
+
-
+
Changelog - Bot Core v8.0.0
@@ -207,6 +207,10 @@
main
+
+ v8.2.1
+
+
v8.2.0
@@ -584,6 +588,7 @@
+
diff --git a/v8.0.0/development.html b/v8.0.0/development.html
index 42deb3bc..6f93821b 100644
--- a/v8.0.0/development.html
+++ b/v8.0.0/development.html
@@ -2,10 +2,10 @@
-
+
-
+
Local Development & Testing - Bot Core v8.0.0
@@ -207,6 +207,10 @@
main
+
+ v8.2.1
+
+
v8.2.0
@@ -468,6 +472,7 @@ to help you test out certain features. Use them as needed.
+
diff --git a/v8.0.0/genindex.html b/v8.0.0/genindex.html
index 791134e7..397a82eb 100644
--- a/v8.0.0/genindex.html
+++ b/v8.0.0/genindex.html
@@ -4,7 +4,7 @@
- Index - Bot Core v8.0.0
+ Index - Bot Core v8.0.0
@@ -205,6 +205,10 @@
main
+
+ v8.2.1
+
+
v8.2.0
@@ -809,6 +813,7 @@
+
diff --git a/v8.0.0/index.html b/v8.0.0/index.html
index 109b0781..c04d0e93 100644
--- a/v8.0.0/index.html
+++ b/v8.0.0/index.html
@@ -2,10 +2,10 @@
-
+
-
+
Bot Core v8.0.0
@@ -207,6 +207,10 @@
main
+
+ v8.2.1
+
+
v8.2.0
@@ -342,17 +346,46 @@
Modules:
- Botcore
@@ -419,6 +452,7 @@
+
diff --git a/v8.0.0/index_redirect.html b/v8.0.0/index_redirect.html
index 4b9e0917..9a9c5c47 100644
--- a/v8.0.0/index_redirect.html
+++ b/v8.0.0/index_redirect.html
@@ -7,7 +7,7 @@
-
+
Bot Core v8.0.0
@@ -59,6 +59,7 @@
+
diff --git a/v8.0.0/output/botcore.async_stats.html b/v8.0.0/output/botcore.async_stats.html
index baf1ddcf..feee04cd 100644
--- a/v8.0.0/output/botcore.async_stats.html
+++ b/v8.0.0/output/botcore.async_stats.html
@@ -2,10 +2,10 @@
-
+
-
+
async_stats - Bot Core v8.0.0
@@ -138,7 +138,7 @@
-
+ -
+ v8.2.1
+
+
-
v8.2.0
@@ -327,7 +331,7 @@
-