-
Notifications
You must be signed in to change notification settings - Fork 51
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
emphasize-lines on code-block and literalinclude adds extra CR #118
Comments
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗 |
Highlighted lines have an extra line break, probably related to this: executablebooks/sphinx-copybutton#118 If there is a fix, we can enable it again.
Highlighted lines have an extra line break, probably related to this: executablebooks/sphinx-copybutton#118 If there is a fix, we can enable it again.
* [REP] Ignore build files of doc * [DOC] Add pip install cmd to example Highlight the need for the utils file * [REP] Ignore logfiles (from running examples) * [FIX] Move examples utilites out of subdir * [DOC] Add install instruction for DeepOBS * [DOC] Make pip install very prominent * [DOC] Remove sphinx copybutton due to issue Highlighted lines have an extra line break, probably related to this: executablebooks/sphinx-copybutton#118 If there is a fix, we can enable it again. * [DOC] Remove sphinx copybutton due to issue Highlighted lines have an extra line break, probably related to this: executablebooks/sphinx-copybutton#118 If there is a fix, we can enable it again. * [FIX] Output to terminal when plotting * [FIX] Ignore irrelevant torch warning for examples * [DOC] Document terminal output in examples * [TST] Define MPLBACKEND for tests * [FIX] More meaningful plotting msg * [DOC] Add a blocking plot after training * [FIX] Move Curvature plots slighty right * [FIX] Round histograms ticks * [FIX] Format ticks * [DOC] Update preview example 01 * [DOC] Make example 02 longer * [DOC] Run DeepOBS Example for 50 epochs * [DOC] Add quickstart page [WIP] * [FIX] Use correct shift between start and end in UpdateSize (#3) The old value was correctly documented to be 1, but wrongly set to 0. This lead to the UpdateSize being zero, because parameters from the same iteration would be used as start/end points in the computation. * [DOC] Replace personal output dir * [DOC] Update Backobs install command * [DOC] Install DeepOBS from development * [DOC] Put utility file reminder in note block * [DOC] Add download button for script * [DOC] Add download button to script * [DOC] Remove quickstart page (for now) Co-authored-by: Felix Dangel <[email protected]>
I can confirm this issue. Here are some code boxes with emphazised lines where this can be tested: |
tl;dr
How this bug seems to happen
var copyTargetText = (trigger) => {
var target = document.querySelector(trigger.attributes['data-clipboard-target'].value);
return formatCopyText(target.innerText, '', false, true, true, true, '', '')
} Unclear why arcade isn't affected anymoreArcade was affected as of 2.6.17 and earlier. I don't know why the tip of development no longer appears to be affected. Upgrading Here are the most promising changes to arcade's REQUIREMENTS_DOCS = [
- "Sphinx==4.5.0",
- "Pygments==2.10.0",
- "sphinx-copybutton==0.5.0",
- "sphinx-sitemap==2.2.0",
+ "Sphinx==6.0.0",
+ "Pygments==2.14.0",
+ "sphinx-copybutton==0.5.1",
+ "sphinx-sitemap==2.4.0",
"dirsync==2.2.5",
"pyyaml==6.0",
- "docutils<0.18",
+ "docutils==0.19", Two potential fixesI haven't thoroughly verified these yet & welcome feedback on them. Use
|
export function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") { |
I know this seems incredibly lazy on my part, but it seems worth the risks at first glance.
Describe the bug
When we copy a code block with emphasize-lines it adds an additional carrier return to the copied text
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Text should be copied as is
Environment
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: