Popclip extension for replacing “- ” (i.e. hyphenspace) within text

Some times when I clip text from pdf document and paste it as plain text in Scrivener or DEVONthink I have a problem in pasted text. I get text like this

“what actually happens, and the underlying mecha- nisms that produce the events in the world.”

“- ” (i.e. HyphenSpace) splits the word mechanisms in mecha- nisms. Previously I will go through the pasted text and manually remove “- “. However, I noticed that PopClip has Remove spaces extension. So I used that extension and modified instead to remove empty spaces to remove HyphenSpace.

Please take in account that you can select large part of text and the changes will be made everywhere, however be careful it will also remove hyphens used as bullets.