Closed FBruzzesi closed 1 week ago
You may have noticed, but just in case: Using the "official mkdocstrings workaround" works on text. If you try to select the example by hovering+clicking with the mouse, not using the copy-to-clipboard button, you only select the correct text. So the easy option would be to not use (or hide) the copy-to-clipboard-button and add the workaround.
Maybe I'm just stating the obvious, but I can't help it.
Hey Dea thanks for the tip! No I didn't know it, that's probably a good first step then!
Yet I would still like to aim to have a setup similar to polars since in their docs you can manual copy and copy-to-clipboard avoid getting these characters, and keep those for doctest-ing.
Polars use Sphinx for the API part of the docs.
That's an example of how ruff
does it: https://github.com/astral-sh/ruff/blob/main/docs/js/extra.js
(JS is not really my strength) 👀
It seems to work using ruff's setup. I can open the PR..
It was not closed automatically 👀
It was not closed automatically 👀
Observed similar behaviour some days ago on another issue. Perhaps, we might add a comment in the PR template which suggests following the GH's suggested pattern Closes #ISSUE-NUMBER
rather than the full URL, whose usage seems to not always guarantee triggering the automatism (https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) or perhaps it is just a useless addition 🤣
Would you say that the following change is enough?
- - Related issue #
+ - Related issue #<issue number>
- - Closes #
+ - Closes #<issue number>
Would you say that the following change is enough?
- - Related issue # + - Related issue #<issue number> - - Closes # + - Closes #<issue number>
Yes, for me this would make it clearer.
What type of report is this?
Improvement
Please describe the issue.
"Copy to clipboard" button in code snippet will also copy
>>>
and...
characters, which to me is extremely annoying.However, we need them to be able to run docstest.
I have been looking for how to enable both, yet my css/javascript is not strong enough.
Here some material:
If you have a suggestion on how it should be, add it below.
Maybe the best way is to check how other libraries achieve this 🙈