Skip to content

Commit

Permalink
Improving copy to clipboard feature- Removing extra lines
Browse files Browse the repository at this point in the history
Signed-off-by: ayushtamra <tamraayush@gmail.com>
  • Loading branch information
ayushtamra committed Jun 30, 2022
1 parent 5e42637 commit 3d5f75e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions layouts/partials/hooks/body-end.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
document.body.appendChild(target);
}
target.value = document.getElementById(elem).innerText;
target.value = target.value.replace(/\n\n/gm,"\n").trim();
// select the content
target.select();

Expand Down

0 comments on commit 3d5f75e

Please sign in to comment.