Skip to content

Commit

Permalink
make copy/save more markdown friendly
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Dec 23, 2023
1 parent 4ed5dcf commit a7348d2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ function getSelectionText(all) {
const text = selection.toString()
.replace(/\s*\n\s*\n\s*\n+/g, '\n\n')
.replace(/\t/g, ' ')
.replace(/([^ ][^ ])\n/g, '$1 \n')
.trim();

if (all) {
Expand Down

0 comments on commit a7348d2

Please sign in to comment.