Skip to content

Commit

Permalink
docs: remove trailing newlines in copied text
Browse files Browse the repository at this point in the history
  • Loading branch information
cestef committed Jun 15, 2024
1 parent fa1c39b commit 9600766
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/theme/book.js
Original file line number Diff line number Diff line change
Expand Up @@ -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$/, "");
},
});

Expand Down

0 comments on commit 9600766

Please sign in to comment.