You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A wrapped long code line will have color issues it if is also emphasized. Some of input may even acquire the background color hence become invisible.
How to Reproduce
.. code-block:: python
:linenos:
:emphasize-lines: 1,3
print("a very long line a very long line a very long line a very long line a very long line a very long line a very long line a very long line a very long line has problems with colors; moreover here the closing parenthesis has same color as background hence is invisible")
print("a very long line a very long line a very long line a very long line a very long line a very long line a very long line a very long line a very long line a very long line a very long line a very long line a very long line a very long line a very long line with no problems if not emphasized")
print("syntax highlighting is ok" + " in this short line"); A = B
print("syntax highlighting is ok" + " in this short line"); A = B
ABC
Expected behavior
No response
Your project
N/A
Screenshots
OS
Mac
Python version
3.10.4
Sphinx version
This is only for current 5.x after merge of #10577 (40841ae).
The text was updated successfully, but these errors were encountered:
This does not fix entirely sphinx-doc#10610 but it does sufficiently for it not to
require reverting sphinx-doc#10577 which tried to solve sphinx-doc#8686 conundrum. In
extreme cases, the sphinx-doc#8686 problem meant that some contents disappearing
at page bottom, so it is probably better that to maintain sphinx-doc#10577 which
will avoid anysuch overflow of code beyond its frame, even though in
some specific cases (a colored entity such as a long string is partly on
both pages), some syntax highlighting gets lost.
There are anyhow other issues with colors for wrapped code lines, even
with no pagebreaks involved, such as sphinx-doc#10615. This patch does not change
the situation there.
jfbu
added a commit
to jfbu/sphinx
that referenced
this issue
Jun 29, 2022
This does not fix entirely sphinx-doc#10610 but it does sufficiently for it not to
require reverting sphinx-doc#10577 which tried to solve sphinx-doc#8686 conundrum. In
extreme cases, the sphinx-doc#8686 problem meant that some contents disappeared
at page bottom, so it is probably better to maintain sphinx-doc#10577 which
will avoid any such overflow of code beyond its frame, even though in
some specific cases (a colored entity such as a long string is partly on
both pages), some syntax highlighting gets lost.
There are anyhow other issues with colors for wrapped code lines, even
with no pagebreaks involved, such as sphinx-doc#10615. This patch does not change
the situation there.
jfbu
changed the title
LaTeX: wrapped long code line has color problems if it is emphasized
LaTeX: wrapped long code line has acquired color problems with current 5.x branch if it is emphasized
Jun 29, 2022
Describe the bug
A wrapped long code line will have color issues it if is also emphasized. Some of input may even acquire the background color hence become invisible.
How to Reproduce
Expected behavior
No response
Your project
N/A
Screenshots
OS
Mac
Python version
3.10.4
Sphinx version
This is only for current 5.x after merge of #10577 (40841ae).
The text was updated successfully, but these errors were encountered: