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
This was first raised as Sphinx issue 13207, which is now closed because the change should be applied here... I am opening this only so that status can be tracked, I hope it is ok ;-).
Expected Behavior
Code-blocks without explicitly assigned lexers should use the Sphinx default (i.e. python) if highlight_language is not set in conf.py and they should use highlight_language if set.
To Reproduce
Attaching two small examples. Install in your Python environment a Sphinx version at least as recent as its commit e65bbb96 (which is in-between 8.1.3 and 8.2.0) and issue make html to confirm the result shows no highlighting in the page whose source is in Markdown syntax (but has correct highlighting in the page whose source is in reST).
Update: the change indicated by Adam at sphinx-doc/sphinx#13207 (comment) fixes this not only with the MRE's provided but also in the original context (which has some extra layers specific to it). I tried out the proposed change not only with Sphinx development HEAD but also with its 8.1.3.