Related to #486 and #487
width or height attribute set needs to be converted back to an <img> as Markdown images can't have a width/height<g-emoji alias="fire" fallback-src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f525.png" ios-version="6.0" title=":fire:">馃敟</g-emoji><g-emoji alias="fire" fallback-src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f525.png" ios-version="6.0" title=":fire:">馃敟</g-emoji><g-emoji alias="fire" fallback-src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f525.png" ios-version="6.0" title=":fire:">馃敟</g-emoji> We should strip out all the junk and just copy the character.chicken.chicken = chicken(chicken).then(chicken)
Results in
```source-js
chicken.chicken = chicken(chicken).then(chicken)
\```
Edit: this is hard. Triple click selects a bunch of tags, including the start of the following <p>
#130 should be copied as:https://github.com/sindresorhus/refined-github/issues/130
instead of
[#130](https://github.com/sindresorhus/refined-github/issues/130)
but perhaps it's not worth the trouble (also because I'm using the current behavior to post shortened URLs for others to see)
.markdown-body. The copy event is triggered on the element that contains the selection start, but if your selection ends outside, it will also include a bunch of other unrelated elements.Mentions should not be converted to links
Are you sure about that? If I mention @sindresorhus and then someone copies this text, I'm not sure if the intent would be to notify you again.
[x] No line breaks or numbers when selecting any list partially (i.e. when <ol> and <ul> are not technically selected):
Juan
Are you sure about that? If I mention @sindresorhus and then someone copies this text, I'm not sure if the intent would be to notify you again.
Agreed. Didn't think about that.
Hi, I'm facing some issues with this feature, often I want to copy sample code from readmes etc, and now it is coping with the whole markdown syntax. Can we make this feature optional or at least detect if the text we want to copy is code block?
@sindresorhus we could leave the standard copy alone and instead show a "copy as markdown" button next to selections.
@bfred-it Yeah maybe. Or we could use a different keyboard shortcut like Cmd+Option+C.
I was just searching through the issue tracker to try to find a way to disable this selectively, and was indeed thinking a keyboard shortcut would be the way to go.
My use case is copying commands from READMEs; if I Ctrl+C them now, I get backticks, which of course confuse my shell.
Yeah, I've had this extension removed for a week or so now and my github happiness has increased significantly. It's a PITA to have enabled with this, especially, _especially_, the amount of times I copy simple things like yarn add <package> or just a package name from the npm to convert myself into yarn syntax and I get markdown syntax with linebreaks and all.
I've disabled this functionality temporarily now (will be published automatically in about 3 hours) until we can implement an alternative way to activate it. I agree now that it should not be the default copy behavior.
I've also been experiencing it making copy not work at all randomly. @bfred-it Seems like https://github.com/sindresorhus/refined-github/pull/636 didn't totally fix it after all.
Most helpful comment
I've disabled this functionality temporarily now (will be published automatically in about 3 hours) until we can implement an alternative way to activate it. I agree now that it should not be the default copy behavior.
I've also been experiencing it making copy not work at all randomly. @bfred-it Seems like https://github.com/sindresorhus/refined-github/pull/636 didn't totally fix it after all.