Hey everyone,
I love this extension but I realized that the "Copy" button that is inserted for some file types isn't inserted in Markdown files? Is this by design? I store a bunch of Markdown files on GitHub that I regularly copy and it would be great to have the button there as well :)
If this isn't by design I'm happy to research and fix this issue.
Cheers,
Dominik
janat08 earned $60.00 by resolving this issue!
- Checkout the Issuehunt explorer to discover more funded issues.
- Need some help from other developers? Add your repositories on Issuehunt to raise funds.
That's because the code responsible for this feature takes the code to be copied directly from the page (or, to be more clear, instructs ZeroClipboard to do that). For Markdown files, GitHub shows a preview instead of the code which makes this impossible.
We're currently discussing implementing the option to show a Markdown file's code in #946. Once that feature is implemented using the suggested "Blame trick" the only thing left to do would be to make the Copy button work with blame views.
That was my guess. Thanks a lot!
@issuehunt has funded $60.00 to this issue.
I guess this should be part of the aforementioned feature (#946) because it depends on it
You mean it's already implemented, can i take it for bounty?
It means you'd have to ensure that copy-file happens after view-markdown-source so the first adds a button to the second (or something along those lines)
Went for simple solution halfway through, the solution where the stuff to be copied is preloaded instead of requiring action from user is still in pull request. This could also benefit view-markdown module.
There're two bugs and regression.
I imagine the regression and bug is fixed in current code pertaining to what is copied (text), and the bug pertaining preloading code triggering twice is is still there. Also as per review the global variables aren't scoped.
Btw it just occured to me that there's now implicit dependency on view-markdown.
For comments related to your code, leave them in the PR
@sindresorhus has rewarded $54.00 to @janat08. See it on IssueHunt