-
Notifications
You must be signed in to change notification settings - Fork 50
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
Copy blanklines on matches(?) #84
Comments
My intuition is that yes, we should copy them because the user is going to expect the output to look almost just like the copied code (minus prompts) |
Also I can't figure this out, but in this repository I used:
which appears to work fine.
with the tonnes of backslashes, but this is what works |
god I hate regexes 😆 |
Dear Chris, first things first: Thanks for your excellent work on this Sphinx addon, it really saves us. We want to report back about what @chrisjsewell originally reported here. Apparently, we are getting tripped by this as well. For example, the code block at [1] will not get copied "as-is", all empty lines are missing. The config entries within Are we missing any respective configuration option here? Otherwise, do you see an easy way to make sphinx-copybutton pass through empty lines? With kind regards, [1] https://crate.io/docs/python/en/latest/sqlalchemy.html#tables |
I'm not quite sure where the fix needs to be for this unfortunately, and haven't had time to dig into the code to figure it out. If you or anybody else wants to take a look I am happy to review PRs! (maybe @sappelhoff has run into this issue too?) |
I haven't (yet), but I am glad that @amotl prepared a patch (and I would vote for making copying empty lines the default) |
Thank you Stefan, appreciate it. Both bringing in the feature as well as making copying empty lines the default behavior have now been folded into #127. |
Following #83 blanklines are not captured, e.g.
If the regex is set, will copy:
The text was updated successfully, but these errors were encountered: