From ba97c3093efa35c848e82b0162c82e67be314e8a Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 10 Dec 2020 16:51:55 +0000 Subject: [PATCH] Update documentation --- _static/basic.css | 6 +++++- _static/doctools.js | 7 ++++--- _static/documentation_options.js | 1 + _static/language_data.js | 2 +- _static/searchtools.js | 28 +++++++++++++++++----------- genindex.html | 14 +++++++------- index.html | 14 +++++++------- search.html | 18 +++++++++--------- searchindex.js | 2 +- 9 files changed, 52 insertions(+), 40 deletions(-) diff --git a/_static/basic.css b/_static/basic.css index ea6972d5..01192852 100644 --- a/_static/basic.css +++ b/_static/basic.css @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- basic theme. * - * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -672,6 +672,10 @@ div.code-block-caption + div > div.highlight > pre { margin-top: 0; } +div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */ + user-select: none; +} + div.code-block-caption span.caption-number { padding: 0.1em 0.3em; font-style: italic; diff --git a/_static/doctools.js b/_static/doctools.js index b33f87fc..daccd209 100644 --- a/_static/doctools.js +++ b/_static/doctools.js @@ -4,7 +4,7 @@ * * Sphinx JavaScript utilities for all documentation. * - * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -283,10 +283,11 @@ var Documentation = { }, initOnKeyListeners: function() { - $(document).keyup(function(event) { + $(document).keydown(function(event) { var activeElementType = document.activeElement.tagName; // don't navigate when in search box or textarea - if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') { + if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT' + && !event.altKey && !event.ctrlKey && !event.metaKey && !event.shiftKey) { switch (event.keyCode) { case 37: // left var prevHref = $('link[rel="prev"]').prop('href'); diff --git a/_static/documentation_options.js b/_static/documentation_options.js index 6d865102..4790c4d3 100644 --- a/_static/documentation_options.js +++ b/_static/documentation_options.js @@ -3,6 +3,7 @@ var DOCUMENTATION_OPTIONS = { VERSION: '', LANGUAGE: 'None', COLLAPSE_INDEX: false, + BUILDER: 'html', FILE_SUFFIX: '.html', HAS_SOURCE: true, SOURCELINK_SUFFIX: '.txt', diff --git a/_static/language_data.js b/_static/language_data.js index 5266fb19..d2b4ee91 100644 --- a/_static/language_data.js +++ b/_static/language_data.js @@ -5,7 +5,7 @@ * This script contains the language-specific data used by searchtools.js, * namely the list of stopwords, stemmer, scorer and splitter. * - * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/_static/searchtools.js b/_static/searchtools.js index 6031f991..d11b33a7 100644 --- a/_static/searchtools.js +++ b/_static/searchtools.js @@ -4,7 +4,7 @@ * * Sphinx JavaScript utilities for the full-text search. * - * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -63,6 +63,11 @@ var Search = { htmlElement.innerHTML = htmlString; $(htmlElement).find('.headerlink').remove(); docContent = $(htmlElement).find('[role=main]')[0]; + if(docContent === undefined) { + console.warn("Content block not found. Sphinx search tries to obtain it " + + "via '[role=main]'. Could you check your theme or template."); + return ""; + } return docContent.textContent || docContent.innerText; }, @@ -245,7 +250,8 @@ var Search = { if (results.length) { var item = results.pop(); var listItem = $('
  • '); - if (DOCUMENTATION_OPTIONS.FILE_SUFFIX === '') { + var requestUrl = ""; + if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') { // dirhtml builder var dirname = item[0] + '/'; if (dirname.match(/\/index\/$/)) { @@ -253,15 +259,15 @@ var Search = { } else if (dirname == 'index/') { dirname = ''; } - listItem.append($('').attr('href', - DOCUMENTATION_OPTIONS.URL_ROOT + dirname + - highlightstring + item[2]).html(item[1])); + requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + dirname; + } else { // normal html builders - listItem.append($('').attr('href', - item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX + - highlightstring + item[2]).html(item[1])); + requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX; } + listItem.append($('').attr('href', + requestUrl + + highlightstring + item[2]).html(item[1])); if (item[3]) { listItem.append($(' (' + item[3] + ')')); Search.output.append(listItem); @@ -269,7 +275,7 @@ var Search = { displayNextItem(); }); } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) { - $.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX, + $.ajax({url: requestUrl, dataType: "text", complete: function(jqxhr, textstatus) { var data = jqxhr.responseText; @@ -424,7 +430,7 @@ var Search = { for (j = 0; j < _files.length; j++) { file = _files[j]; if (!(file in scoreMap)) - scoreMap[file] = {} + scoreMap[file] = {}; scoreMap[file][word] = o.score; } }); @@ -432,7 +438,7 @@ var Search = { // create the mapping for (j = 0; j < files.length; j++) { file = files[j]; - if (file in fileMap) + if (file in fileMap && fileMap[file].indexOf(word) === -1) fileMap[file].push(word); else fileMap[file] = [word]; diff --git a/genindex.html b/genindex.html index 18f9e530..4eb1e1f7 100644 --- a/genindex.html +++ b/genindex.html @@ -8,11 +8,11 @@ Index — No Errors Test Project documentation - - - - - + + + + + @@ -72,7 +72,7 @@

    Quick search

    - + @@ -89,7 +89,7 @@

    Quick search

    ©2019, sphinx-action Test Suite. | - Powered by
    Sphinx 2.2.0 + Powered by Sphinx 2.4.4 & Alabaster 0.7.12 diff --git a/index.html b/index.html index 504948ab..7d336f41 100644 --- a/index.html +++ b/index.html @@ -7,11 +7,11 @@ Welcome to No Errors Test Project’s documentation! — No Errors Test Project documentation - - - - - + + + + + @@ -78,7 +78,7 @@

    Quick search

    - + @@ -95,7 +95,7 @@

    Quick search

    ©2019, sphinx-action Test Suite. | - Powered by Sphinx 2.2.0 + Powered by Sphinx 2.4.4 & Alabaster 0.7.12 | diff --git a/search.html b/search.html index 211f6dcc..055201ea 100644 --- a/search.html +++ b/search.html @@ -8,15 +8,15 @@ - - - - - - + + + + + + - + @@ -37,7 +37,7 @@

    Search

    - +

    Please activate JavaScript to enable the search functionality. @@ -99,7 +99,7 @@

    Related Topics

    ©2019, sphinx-action Test Suite. | - Powered by Sphinx 2.2.0 + Powered by Sphinx 2.4.4 & Alabaster 0.7.12
    diff --git a/searchindex.js b/searchindex.js index 7c2c5125..2ba3b868 100644 --- a/searchindex.js +++ b/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["index"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,sphinx:56},filenames:["index.rst"],objects:{},objnames:{},objtypes:{},terms:{index:0,modul:0,page:0,search:0},titles:["Welcome to No Errors Test Project\u2019s documentation!"],titleterms:{document:0,error:0,indic:0,project:0,tabl:0,test:0,welcom:0}}) \ No newline at end of file +Search.setIndex({docnames:["index"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":1,"sphinx.domains.index":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,sphinx:56},filenames:["index.rst"],objects:{},objnames:{},objtypes:{},terms:{index:0,modul:0,page:0,search:0},titles:["Welcome to No Errors Test Project\u2019s documentation!"],titleterms:{document:0,error:0,indic:0,project:0,tabl:0,test:0,welcom:0}}) \ No newline at end of file