Skip to content
Snippets Groups Projects
Commit b6ac5332 authored by Douwe Maan's avatar Douwe Maan
Browse files

Don't copy as GFM when more than GFM is selected

parent 9b800bc6
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -260,6 +260,9 @@
const documentFragment = window.gl.utils.getSelectedFragment();
if (!documentFragment) return;
 
// If the documentFragment contains more than just Markdown, don't copy as GFM.
if (documentFragment.querySelector('.md, .wiki')) return;
e.preventDefault();
clipboardData.setData('text/plain', documentFragment.textContent);
 
Loading
Loading
Loading
Loading
@@ -44,6 +44,9 @@
documentFragment = window.gl.utils.getSelectedFragment();
if (!documentFragment) return;
 
// If the documentFragment contains more than just Markdown, don't copy as GFM.
if (documentFragment.querySelector('.md, .wiki')) return;
selected = window.gl.CopyAsGFM.nodeToGFM(documentFragment);
 
replyField = $('.js-main-target-form #note_note');
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment