Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes some issues with some specific themes (see).
Some problems are a result of css rules being overwritten by theme rules (astropy-theme, py3doc-enhanced-theme, typlog-theme), others are a result of an old way (julia-theme, pytorch-theme, itcase-theme, pyviz-theme) to include additional javascript files in a theme.
Details concerning javascript issues
The old way to include javascript files (
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
) does not support a missing file name so the browser tries to fetch a fileNone
, which leavescopybuttonSkipText
as undefined and breaks the copy functionality. If a theme usesjs_tag
to include javascript files forsphinx>=1.8
it works fine (maybesphinx>=1.8
should also be a minimal requirement for this package?).If a theme doesn't have the following part (itcase-theme, pyviz-theme):
copybutton.js
does throw the following errorcopybutton.js:105 Uncaught ReferenceError: DOCUMENTATION_OPTIONS is not defined
in the console (problem withclipboardButton
) and even the icons aren't generated, due to early breaking.IMHO this should be mentioned in the docs, maybe in a topic like
theme support/requirements
, so theme creators have a reference , if they want to supportsphinx-copybutton