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>
(cherry picked from commit 9ef7478)
  • Loading branch information
jsquyres authored and rhc54 committed Sep 4, 2023
1 parent 92b2162 commit 3f7772c
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 @@ -187,3 +187,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 3f7772c

Please sign in to comment.