Merge pull request #326 from budziq/fix_clipboard

copying to clipboard no longer copies the compilation results from "play"
This commit is contained in:
Mathieu David 2017-06-12 14:15:41 +02:00 committed by GitHub
commit 19692c76df
1 changed files with 1 additions and 1 deletions

View File

@ -201,7 +201,7 @@ $( document ).ready(function() {
var clipboardSnippets = new Clipboard('.clip-button', {
text: function(trigger) {
hideTooltip(trigger);
return trigger.parentElement.parentElement.textContent;
return $(trigger).parents(".playpen").find("code.language-rust.hljs")[0].textContent;
}
});
clipboardSnippets.on('success', function(e) {