Skip to content

Commit ba97c30

Browse files
committed
Update documentation
1 parent 178b328 commit ba97c30

File tree

9 files changed

+52
-40
lines changed

9 files changed

+52
-40
lines changed

_static/basic.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Sphinx stylesheet -- basic theme.
66
*
7-
* :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
7+
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
88
* :license: BSD, see LICENSE for details.
99
*
1010
*/
@@ -672,6 +672,10 @@ div.code-block-caption + div > div.highlight > pre {
672672
margin-top: 0;
673673
}
674674

675+
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
676+
user-select: none;
677+
}
678+
675679
div.code-block-caption span.caption-number {
676680
padding: 0.1em 0.3em;
677681
font-style: italic;

_static/doctools.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Sphinx JavaScript utilities for all documentation.
66
*
7-
* :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
7+
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
88
* :license: BSD, see LICENSE for details.
99
*
1010
*/
@@ -283,10 +283,11 @@ var Documentation = {
283283
},
284284

285285
initOnKeyListeners: function() {
286-
$(document).keyup(function(event) {
286+
$(document).keydown(function(event) {
287287
var activeElementType = document.activeElement.tagName;
288288
// don't navigate when in search box or textarea
289-
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') {
289+
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
290+
&& !event.altKey && !event.ctrlKey && !event.metaKey && !event.shiftKey) {
290291
switch (event.keyCode) {
291292
case 37: // left
292293
var prevHref = $('link[rel="prev"]').prop('href');

_static/documentation_options.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ var DOCUMENTATION_OPTIONS = {
33
VERSION: '',
44
LANGUAGE: 'None',
55
COLLAPSE_INDEX: false,
6+
BUILDER: 'html',
67
FILE_SUFFIX: '.html',
78
HAS_SOURCE: true,
89
SOURCELINK_SUFFIX: '.txt',

_static/language_data.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* This script contains the language-specific data used by searchtools.js,
66
* namely the list of stopwords, stemmer, scorer and splitter.
77
*
8-
* :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
8+
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
99
* :license: BSD, see LICENSE for details.
1010
*
1111
*/

_static/searchtools.js

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Sphinx JavaScript utilities for the full-text search.
66
*
7-
* :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
7+
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
88
* :license: BSD, see LICENSE for details.
99
*
1010
*/
@@ -63,6 +63,11 @@ var Search = {
6363
htmlElement.innerHTML = htmlString;
6464
$(htmlElement).find('.headerlink').remove();
6565
docContent = $(htmlElement).find('[role=main]')[0];
66+
if(docContent === undefined) {
67+
console.warn("Content block not found. Sphinx search tries to obtain it " +
68+
"via '[role=main]'. Could you check your theme or template.");
69+
return "";
70+
}
6671
return docContent.textContent || docContent.innerText;
6772
},
6873

@@ -245,31 +250,32 @@ var Search = {
245250
if (results.length) {
246251
var item = results.pop();
247252
var listItem = $('<li style="display:none"></li>');
248-
if (DOCUMENTATION_OPTIONS.FILE_SUFFIX === '') {
253+
var requestUrl = "";
254+
if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') {
249255
// dirhtml builder
250256
var dirname = item[0] + '/';
251257
if (dirname.match(/\/index\/$/)) {
252258
dirname = dirname.substring(0, dirname.length-6);
253259
} else if (dirname == 'index/') {
254260
dirname = '';
255261
}
256-
listItem.append($('<a/>').attr('href',
257-
DOCUMENTATION_OPTIONS.URL_ROOT + dirname +
258-
highlightstring + item[2]).html(item[1]));
262+
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + dirname;
263+
259264
} else {
260265
// normal html builders
261-
listItem.append($('<a/>').attr('href',
262-
item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
263-
highlightstring + item[2]).html(item[1]));
266+
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX;
264267
}
268+
listItem.append($('<a/>').attr('href',
269+
requestUrl +
270+
highlightstring + item[2]).html(item[1]));
265271
if (item[3]) {
266272
listItem.append($('<span> (' + item[3] + ')</span>'));
267273
Search.output.append(listItem);
268274
listItem.slideDown(5, function() {
269275
displayNextItem();
270276
});
271277
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
272-
$.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX,
278+
$.ajax({url: requestUrl,
273279
dataType: "text",
274280
complete: function(jqxhr, textstatus) {
275281
var data = jqxhr.responseText;
@@ -424,15 +430,15 @@ var Search = {
424430
for (j = 0; j < _files.length; j++) {
425431
file = _files[j];
426432
if (!(file in scoreMap))
427-
scoreMap[file] = {}
433+
scoreMap[file] = {};
428434
scoreMap[file][word] = o.score;
429435
}
430436
});
431437

432438
// create the mapping
433439
for (j = 0; j < files.length; j++) {
434440
file = files[j];
435-
if (file in fileMap)
441+
if (file in fileMap && fileMap[file].indexOf(word) === -1)
436442
fileMap[file].push(word);
437443
else
438444
fileMap[file] = [word];

genindex.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
<title>Index &#8212; No Errors Test Project documentation</title>
99
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
1010
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
11-
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
12-
<script type="text/javascript" src="_static/jquery.js"></script>
13-
<script type="text/javascript" src="_static/underscore.js"></script>
14-
<script type="text/javascript" src="_static/doctools.js"></script>
15-
<script type="text/javascript" src="_static/language_data.js"></script>
11+
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
12+
<script src="_static/jquery.js"></script>
13+
<script src="_static/underscore.js"></script>
14+
<script src="_static/doctools.js"></script>
15+
<script src="_static/language_data.js"></script>
1616
<link rel="index" title="Index" href="#" />
1717
<link rel="search" title="Search" href="search.html" />
1818

@@ -72,7 +72,7 @@ <h3 id="searchlabel">Quick search</h3>
7272
</form>
7373
</div>
7474
</div>
75-
<script type="text/javascript">$('#searchbox').show(0);</script>
75+
<script>$('#searchbox').show(0);</script>
7676

7777

7878

@@ -89,7 +89,7 @@ <h3 id="searchlabel">Quick search</h3>
8989
&copy;2019, sphinx-action Test Suite.
9090

9191
|
92-
Powered by <a href="http://sphinx-doc.org/">Sphinx 2.2.0</a>
92+
Powered by <a href="http://sphinx-doc.org/">Sphinx 2.4.4</a>
9393
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
9494

9595
</div>

index.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
<title>Welcome to No Errors Test Project’s documentation! &#8212; No Errors Test Project documentation</title>
88
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
99
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
10-
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
11-
<script type="text/javascript" src="_static/jquery.js"></script>
12-
<script type="text/javascript" src="_static/underscore.js"></script>
13-
<script type="text/javascript" src="_static/doctools.js"></script>
14-
<script type="text/javascript" src="_static/language_data.js"></script>
10+
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
11+
<script src="_static/jquery.js"></script>
12+
<script src="_static/underscore.js"></script>
13+
<script src="_static/doctools.js"></script>
14+
<script src="_static/language_data.js"></script>
1515
<link rel="index" title="Index" href="genindex.html" />
1616
<link rel="search" title="Search" href="search.html" />
1717

@@ -78,7 +78,7 @@ <h3 id="searchlabel">Quick search</h3>
7878
</form>
7979
</div>
8080
</div>
81-
<script type="text/javascript">$('#searchbox').show(0);</script>
81+
<script>$('#searchbox').show(0);</script>
8282

8383

8484

@@ -95,7 +95,7 @@ <h3 id="searchlabel">Quick search</h3>
9595
&copy;2019, sphinx-action Test Suite.
9696

9797
|
98-
Powered by <a href="http://sphinx-doc.org/">Sphinx 2.2.0</a>
98+
Powered by <a href="http://sphinx-doc.org/">Sphinx 2.4.4</a>
9999
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
100100

101101
|

search.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
99
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
1010

11-
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
12-
<script type="text/javascript" src="_static/jquery.js"></script>
13-
<script type="text/javascript" src="_static/underscore.js"></script>
14-
<script type="text/javascript" src="_static/doctools.js"></script>
15-
<script type="text/javascript" src="_static/language_data.js"></script>
16-
<script type="text/javascript" src="_static/searchtools.js"></script>
11+
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
12+
<script src="_static/jquery.js"></script>
13+
<script src="_static/underscore.js"></script>
14+
<script src="_static/doctools.js"></script>
15+
<script src="_static/language_data.js"></script>
16+
<script src="_static/searchtools.js"></script>
1717
<link rel="index" title="Index" href="genindex.html" />
1818
<link rel="search" title="Search" href="#" />
19-
<script type="text/javascript" src="searchindex.js" defer></script>
19+
<script src="searchindex.js" defer></script>
2020

2121

2222
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
@@ -37,7 +37,7 @@
3737

3838
<h1 id="search-documentation">Search</h1>
3939
<div id="fallback" class="admonition warning">
40-
<script type="text/javascript">$('#fallback').hide();</script>
40+
<script>$('#fallback').hide();</script>
4141
<p>
4242
Please activate JavaScript to enable the search
4343
functionality.
@@ -99,7 +99,7 @@ <h3>Related Topics</h3>
9999
&copy;2019, sphinx-action Test Suite.
100100

101101
|
102-
Powered by <a href="http://sphinx-doc.org/">Sphinx 2.2.0</a>
102+
Powered by <a href="http://sphinx-doc.org/">Sphinx 2.4.4</a>
103103
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
104104

105105
</div>

searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)