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

directly inserting skipText into js #58

Merged
merged 8 commits into from
Feb 5, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
remove the last newline from teh coppied text
  • Loading branch information
tzach committed Jan 22, 2020
commit 0cef66bb9fa1359bdf1ca5ad66479690b7f83ef8
2 changes: 1 addition & 1 deletion sphinx_copybutton/_static/copybutton.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ var copyTargetText = (trigger) => {
textContent[index] = line.slice(copybuttonSkipText.length)
}
});
return textContent.join('\n')
return textContent.slice(0, -1).join('\n') + textContent.slice(-1)
}

const addCopyButtonToCodeCells = () => {
Expand Down