Is there a extension which adds/removes "> ", i.e. Markdown’s block quote sign to the beginning of each selected line? Would be a great help!
# popclip
name: Add / Remove block quote.
icon: circle filled A>R
actions:
- title: Add Block Quote
icon: circle filled A>
javascript: |
const text = popclip.input.text;
popclip.pasteText('> ' + text.split(/\n/).join('\n> '))
- title: Remove Block Quote
icon: circle filled R>
javascript: |
const text = popclip.input.text;
popclip.pasteText(text.replace(/^>\s+/gm, ''))
3 Likes
This one is great too! So great that we can import extension snippets so easily and transparently!
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'))
1 Like