jbms / sphinx-immaterial

Adaptation of the popular mkdocs-material material design theme to the sphinx documentation system
https://jbms.github.io/sphinx-immaterial/
Other
196 stars 29 forks source link

html_codeblock_linenos_style will be deprecated in sphinx #158

Closed 2bndy5 closed 1 year ago

2bndy5 commented 2 years ago

[The fix for #26] will have to change soon (related to https://github.com/jbms/sphinx-immaterial/issues/26#issuecomment-1067465334). Sphinx v6.0 will no longer support this html_codeblock_linenos_style config option (which means inline line numbers for code blocks). Fortunately, the upstream CSS has support for a custom HTML attribute data-linenos (originally provided by pymdownx.highlight), but that will mean monkey patching the code-blocks output to use the new data-linenos attribute.

_Originally posted by @2bndy5 in https://github.com/jbms/sphinx-immaterial/pull/157#discussion_r959113031_

2bndy5 commented 2 years ago

I already asked about inline support on upstream, but the request was rejected due to using clipboard.js (https://github.com/squidfunk/mkdocs-material/issues/4061)

2bndy5 commented 1 year ago

Thanks to https://github.com/sphinx-doc/sphinx/pull/10922, we have more time to develop a workaround for this. Although I still can't think of a way that doesn't involve monkeypatching literal blocks.

2bndy5 commented 1 year ago

I'm closing this as there is no plans in upstream (both sphinx and mkdocs-material) that require a solution here.