diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-01-19 19:02:19 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-01-19 19:02:19 +0300 |
commit | b6ac53322e8562e65bbed3a4decce2dd057a3d1e (patch) | |
tree | 2d5d17fc455d4a049ed9ab54555dea71cfcdd27a /app/assets/javascripts/shortcuts_issuable.js | |
parent | 9b800bc6418621b601fead1c18dd0a327534c998 (diff) |
Don't copy as GFM when more than GFM is selected
Diffstat (limited to 'app/assets/javascripts/shortcuts_issuable.js')
-rw-r--r-- | app/assets/javascripts/shortcuts_issuable.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/assets/javascripts/shortcuts_issuable.js b/app/assets/javascripts/shortcuts_issuable.js index 363379f49ae..6603b9679b9 100644 --- a/app/assets/javascripts/shortcuts_issuable.js +++ b/app/assets/javascripts/shortcuts_issuable.js @@ -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'); |