urlwatch icon indicating copy to clipboard operation
urlwatch copied to clipboard

White underline visible in documentation code blocks due to Sphinx Theme

Open polyzen opened this issue 1 year ago • 9 comments

I see the docs are generated with quite an old version of Sphinx, maybe this has been fixed since then. If so, code blocks should probably all be made to use .. code-block.

polyzen avatar Mar 01 '23 04:03 polyzen

You mean the docs on https://urlwatch.readthedocs.io/en/latest/ or the ones that one can build locally?

thp avatar Apr 11 '23 08:04 thp

The deployed docs

polyzen avatar Apr 11 '23 08:04 polyzen

eg. https://urlwatch.readthedocs.io/en/latest/advanced.html#setting-the-content-width-for-html2text-lynx-method

polyzen avatar Apr 11 '23 08:04 polyzen

Looks okay from here:

image

With this source:

.. code-block:: yaml

   url: http://example.com/longlines.html
   filter:
     - html2text:
         method: lynx
         width: 400

Which browser/settings are you using?

thp avatar Apr 11 '23 10:04 thp

Or do you mean the whitespace underline?

This could be a pygments/theme:

  • https://github.com/pygments/pygments/issues/2020
  • https://github.com/sphinx-doc/alabaster/pull/188

If this is the issue, maybe filing a bug over at https://github.com/readthedocs/readthedocs.org/issues might be the way to go?

thp avatar Apr 11 '23 10:04 thp

One thing that might help is going with a newer Ubuntu and Python version, tried this here: https://github.com/thp/urlwatch/commit/07e000f5f9989442b707ec35a0d8ee347b996bfe

thp avatar Apr 11 '23 11:04 thp

Not sure, but newer Ubuntu might still be on the same Sphinx version :p Tested on latest Sphinx, but the issue was still there.

https://github.com/sphinx-doc/alabaster/pull/188 fixed the issue, rebased and created a new PR: https://github.com/sphinx-doc/alabaster/pull/202

polyzen avatar Apr 11 '23 18:04 polyzen

Not sure if https://github.com/readthedocs/sphinx_rtd_theme also needs to be updated?

thp avatar Apr 12 '23 14:04 thp

Not sure if https://github.com/readthedocs/sphinx_rtd_theme also needs to be updated?

Haven't checked yet. If you're considering changing themes, Furo is also quite nice and well maintained.

polyzen avatar Apr 13 '23 19:04 polyzen