I don’t think that a extension for this already exists, that’s why I suggest:
Add/remove the Markdown indication of a forced line break (two spaces at the line end) to each line of the selection.
I don’t think that a extension for this already exists, that’s why I suggest:
Add/remove the Markdown indication of a forced line break (two spaces at the line end) to each line of the selection.
# popclip
name: Add / Remove line break.
icon: circle filled A/R
actions:
- title: Add Bread
icon: circle filled A.
javascript: |
const text = popclip.input.text;
popclip.pasteText(text.split(/\n/).join(' \n') + ' ')
- title: Remove Break
icon: circle filled R.
javascript: |
const text = popclip.input.text;
popclip.pasteText(text.trim().split(/\s+\n/).join('\n'))
Hey @dofyyu, works brilliantly! Thanks a lot!
I have done some decorative changes which I might share. Maybe somebody likes them.
# popclip
name: Md Line breaks
icon: circle filled A/R
actions:
- title: Add Md Breaks
icon: circle filled A.
javascript: |
const text = popclip.input.text;
popclip.pasteText(text.split(/\n/).join(' \n') + ' ')
- title: Remove Md Breaks
icon: circle filled R.
javascript: |
const text = popclip.input.text;
popclip.pasteText(text.trim().split(/\s+\n/).join('\n'))