Created
October 6, 2022 18:01
-
-
Save tayiorbeii/3bb9b9e1c1804875162dc573b1e44af6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import "@johnlindquist/kit" | |
| // Author: Taylor Bell | |
| // Name: Otter Highlight Cleaner | |
| let text = await paste() | |
| let lines = text.split('\n') | |
| let removedHighlights = lines.filter(x => !x.match(/\[.*\]/)) | |
| let removedEmptyLines = removedHighlights.filter(x => x !== '').join('\n') | |
| await copy(removedEmptyLines) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment