Closed lex111 closed 5 years ago
I assume you're talking about code blocks in comments. I saw an extension like that a while ago but it wasn't particularly pretty.
Here's a code block for fun
for i in 1..101 {
if i % 15 == 0 {
println!("FizzBuzz");
} else if i % 5 == 0 {
println!("Buzz");
} else if i % 3 == 0 {
println!("Fizz");
} else {
println!("{}", i);
}
}
Where should the button be?
If you're interested, I've got a userscript that'll allow you to copy markdown code snippets.
@Mottie thank you! This is what I had in mind!
@bfred-it Let's implement this in the extension!
PR welcome.
For anyone that wants this, please also send this feature request to GitHub: support@github.com
If it helps, CodeCopy is an open source extension that does this for many sites, including GitHub.
I'm not particularly fond of buttons like these (noise + they might get in the way) and since there are already options, maybe we don't need to include this in Refined GitHub
I think that there are existing options for this and we don't need to implement it in Refined GitHub.
I don't think the above statement is true. It requires the reader to install a plugin/extension for their browser. The script tag is also not permitted for very good reasons for very similar motivations.
I think this is a reasonable request please reconsider.
@karlmutch having the feature in RGH also requires an extension. RGH's goal is not to implement every feature possible, especially when existing options cover the feature.
+1 for this idea it would be better if this was supported out of the box vs client-side configuration.
+! Github has already implemented some form of this internally in the Settings -> Actions -> Add self-hosted runner page:
It would be very helpful if github wiki (and issues) got this as a markdown extension behavior. I can only imagine the amount of human time and productivity improvement this simple feature would add. Possibly one of the lowest hanging fruits for Github in improving the world of software.
requires the reader to install a plugin/extension for their browser.
I hope that people landing on this issue understand that :
This repo is for an extension. If you want this behavior natively, send this suggestion to GitHub, not here.
Or just use the codecopy extension. It works and it's supported.
This is now supported natively by GitHub https://twitter.com/natfriedman/status/1391862005095485440?s=21
For example, insert some icon inside the code block, when you click on it, all the content will be copied to the clipboard.