Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copy button is not displayed for longer code block #55

Closed
zclab opened this issue Apr 1, 2022 · 7 comments · Fixed by #78
Closed

copy button is not displayed for longer code block #55

zclab opened this issue Apr 1, 2022 · 7 comments · Fixed by #78

Comments

@zclab
Copy link

zclab commented Apr 1, 2022

I found that there is no copy button for longer code block which is 40 lines or more.

Expected behaviour

code2

Actual behaviour

code1

I use: Python 3.8.9, sphinx 4.4.0 and sphinx_material 0.4.0

@2bndy5
Copy link
Collaborator

2bndy5 commented Apr 1, 2022

It looks like the doc-string's indentation is different by a level. I doubt that would fix this though. What was the last version number with the button that had worked for you?

@zclab
Copy link
Author

zclab commented Apr 1, 2022

It worked on sphinx_material 0.3.1

@2bndy5
Copy link
Collaborator

2bndy5 commented Apr 12, 2022

I noticed that this happens with the auto-docs' generated source code pages

image
vs
image

Still looking into this...

@2bndy5
Copy link
Collaborator

2bndy5 commented Apr 13, 2022

Well, this isn't a problem in mkdocs-material, but it definitely is something we merged in from upstream v8.2.5 - I suspect it is something to do with the changes made to mounting code blocks for large pages (a speed up to satisfy squidfunk/mkdocs-material#3643).

TL;DR - Still not exactly sure what we merged from upstream that is causing this issue. I'm focusing on this file's diff.

@jbms
Copy link
Owner

jbms commented Apr 18, 2022

This is actually an upstream bug that was fixed here:
squidfunk/mkdocs-material@88cfda4

We just need to merge in the updates.

@jbms
Copy link
Owner

jbms commented Apr 18, 2022

Note: The best way to check if something is an upstream bug is to reproduce using the version of mkdocs-material listed in MKDOCS_MATERIAL_MERGE_BASE.

@2bndy5
Copy link
Collaborator

2bndy5 commented Apr 18, 2022

yeah, that was my bad. Even more motivation to resolve the merge problems with recently v8.2.8+.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants