diff --git a/docs/theme/book.js b/docs/theme/book.js index 2477b53..77bbac7 100644 --- a/docs/theme/book.js +++ b/docs/theme/book.js @@ -700,7 +700,9 @@ function playground_text(playground, hidden = true) { text: function (trigger) { hideTooltip(trigger); let playground = trigger.closest("pre"); - return playground_text(playground, false); + const text = playground_text(playground, false).trim(); + // Remove trailing newline + return text.replace(/\n$/, ""); }, });