Sphinx: Use class instead of instance in add_lexer + Fixes search on sphinx>1.7.9 (#7623)

* Use class instead of instance in add_lexer

* Fixes search with newer sphinx
This commit is contained in:
Mirko 2021-09-14 21:27:19 +02:00 committed by GitHub
parent 9152bc8590
commit 6a99134255
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,5 @@
Cython>=0.24 Cython>=0.24
# Frozen Sphinx requirements for easier pip installation # Frozen Sphinx requirements for easier pip installation
sphinx==1.7.9
sphinxcontrib-actdiag sphinxcontrib-actdiag
sphinxcontrib-blockdiag sphinxcontrib-blockdiag
sphinxcontrib-nwdiag sphinxcontrib-nwdiag

View File

@ -106,12 +106,14 @@
}; };
</script> </script>
{%- block scripts %}
{%- for scriptfile in script_files %} {%- for scriptfile in script_files %}
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script> <script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
{%- endfor %} {%- endfor %}
<script type="text/javascript" src="{{ pathto('_static/jquery-effects-core-and-slide.js', 1) }}"></script> <script type="text/javascript" src="{{ pathto('_static/jquery-effects-core-and-slide.js', 1) }}"></script>
<script type="text/javascript" src="{{ pathto('_static/jquery.cookie.js', 1) }}"></script> <script type="text/javascript" src="{{ pathto('_static/jquery.cookie.js', 1) }}"></script>
<script type="text/javascript" src="{{ pathto('_static/kivy.js', 1) }}"></script> <script type="text/javascript" src="{{ pathto('_static/kivy.js', 1) }}"></script>
{%- endblock %}
{%- if use_opensearch %} {%- if use_opensearch %}
<link rel="search" type="application/opensearchdescription+xml" <link rel="search" type="application/opensearchdescription+xml"
title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}" title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"

View File

@ -109,7 +109,7 @@ def setup(app):
sys.path += [join(dirname(kivy.__file__), 'extras')] sys.path += [join(dirname(kivy.__file__), 'extras')]
from highlight import KivyLexer from highlight import KivyLexer
app.add_lexer('kv', KivyLexer()) app.add_lexer('kv', KivyLexer)
app.add_autodocumenter(CythonMethodDocumenter) app.add_autodocumenter(CythonMethodDocumenter)
app.connect('autodoc-process-docstring', callback_docstring) app.connect('autodoc-process-docstring', callback_docstring)
app.connect('autodoc-process-signature', callback_signature) app.connect('autodoc-process-signature', callback_signature)