Skip to content

Commit

Permalink
docs: fix HTML word wapping in table cells
Browse files Browse the repository at this point in the history
The sphinx_rtd_theme does not properly handle wrapping long lines in
table cells when rendering to HTML due to a CSS issue (see
readthedocs/sphinx_rtd_theme#1505).

Until the issue is fixed upstream in sphinx_rtd_theme, we can simply
override the CSS here (in conf.py).

The PRRTE docs don't use the RST ".. list-table::" directive much, so
this change won't really have much of an effect here.  However, OMPI
and PMIx were updated with this conf.py change, so we might as well
keep all 3 projects more-or-less in sync.

Signed-off-by: Jeff Squyres <jeff@squyres.com>
  • Loading branch information
jsquyres committed Aug 21, 2023
1 parent 1a01710 commit f85fadc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,16 @@
.. |flex_min_version| replace:: {flex_min_version}
"""

# The sphinx_rtd_theme does not properly handle wrapping long lines in
# table cells when rendering to HTML due to a CSS issue (see
# https://github.com/readthedocs/sphinx_rtd_theme/issues/1505). Until
# the issue is fixed upstream in sphinx_rtd_theme, we can simply
# override the CSS here.
rst_prolog += """
.. raw:: html
<style>
.wy-table-responsive table td,.wy-table-responsive table th{white-space:normal}
</style>
"""

0 comments on commit f85fadc

Please sign in to comment.