From a6275ebcdb45b4b398efaf8231c986d6f3aca7df Mon Sep 17 00:00:00 2001 From: Michal Budzynski Date: Mon, 12 Jun 2017 14:02:53 +0200 Subject: [PATCH] copying to clipboard no longer copies the compilation results from "play" --- src/theme/book.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/theme/book.js b/src/theme/book.js index 86b47d09..8b1cdc15 100644 --- a/src/theme/book.js +++ b/src/theme/book.js @@ -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) {