Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not overflow object cross references #1369

Merged
merged 8 commits into from
Nov 4, 2022
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This folder is auto-generated
docs/api

*.pyc
*.egg-info
*.egg
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
'sphinx.ext.viewcode',
'sphinxcontrib.httpdomain',
'sphinx_rtd_theme',
'sphinx_automodapi.automodapi',
benjaoming marked this conversation as resolved.
Show resolved Hide resolved
]

templates_path = ['_templates']
Expand Down
14 changes: 14 additions & 0 deletions docs/demo/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,17 @@ Data
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce congue elit eu hendrerit mattis.

Some data link :data:`Data_item_1`.


Sphinx Extensions
=================

.. This adds a simple regression test for handling issues displaying the tables generated by sphinx-automodapi
.. See: https://github.com/readthedocs/sphinx_rtd_theme/issues/1368
.. If the extension stops being compatible with Sphinx or similar, the demo can be removed

sphinx-automodapi
-----------------

.. automodapi:: test_py_module.test

3 changes: 3 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
sphinx>=3.0
sphinxcontrib-httpdomain

# Testing that we properly style outputs of this extension
sphinx-automodapi==0.14.1
2 changes: 1 addition & 1 deletion sphinx_rtd_theme/static/css/theme.css

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/sass/_theme_rst.sass
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,8 @@
&.xref, a &
font-weight: bold
color: $text-codexref-color
// https://github.com/readthedocs/sphinx_rtd_theme/issues/1368
overflow-wrap: normal
pre, kbd, samp
font-family: $code-font-family
// If the literal is inside an a tag, let's color it like a link
Expand Down