-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Description
Contribution guidelines
- I've read the contribution guidelines and wholeheartedly agree
I've found a bug and checked that ...
- ... the problem doesn't occur with the
mkdocsorreadthedocsthemes - ... the problem persists when all overrides are removed, i.e.
custom_dir,extra_javascriptandextra_css - ... the documentation does not mention anything about my problem
- ... there are no open or closed issues that are related to my problem
Description
When using a fenced pycon codeblock (Python console syntax highlighting) the >>> characters can be skipped of being manually selected using the next custom CSS as is documented in mkdocstrings:
.highlight .gp, .highlight .go { /* Generic.Prompt, Generic.Output */
user-select: none;
}But clicking in the "Copy to clipboard button", it copies the whole line, including the >>> part, which is not desirable for pycon code blocks. It seems that ClipboardJS offers a way to edit the content that is copied.
It should be reasonable to add more logic to the clipboard component? Maybe checking the CSS of the text and skipping all the content styled with user-select: none;? Thanks in advance!
Expected behaviour
Copying pycon fenced code blocks should not include >>> Python console characters.
Actual behaviour
Undesired characters are copied.
Steps to reproduce
N/A
Package versions
All
Configuration
markdown_extensions:
- pymdownx.highlight:
use_pygments: true
- pymdownx.superfences
extra_css:
- css/code_select.cssSystem information
N/A
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels