Skip to content

Instantly share code, notes, and snippets.

@tayiorbeii
Last active October 3, 2022 20:50
Show Gist options
  • Select an option

  • Save tayiorbeii/8188be0bb4d071a99dc3cc934f2fc723 to your computer and use it in GitHub Desktop.

Select an option

Save tayiorbeii/8188be0bb4d071a99dc3cc934f2fc723 to your computer and use it in GitHub Desktop.
import "@johnlindquist/kit"
// Name: roam clipboard reformatter
// Description: Copy nested blocks from Roam and run this script to un-indent and remove brackets
// Author: Taylor Bell
// Twitter: @taylorbell
let outdent = await npm('tiny-dedent')
let replaceAll = await npm('just-replace-all')
let text = await paste()
let outdentedTextLines = replaceAll(replaceAll(outdent(text), '[[', ''), ']]', '')
await copy(outdentedTextLines)
@zacjones93

Copy link
Copy Markdown
import "@johnlindquist/kit"

// Name: roam clipboard reformatter
// Description: List all Chrome tabs. Then switch to that tab
// Author: Taylor Bell
// Twitter: @taylorbell
let outdent = await npm('tiny-dedent')
let replaceAll = await npm('just-replace-all')

let text = await paste()

let outdentedTextLines = replaceAll(replaceAll(outdent(text), '[[', ''), ']]', '')

await copy(outdentedTextLines)

For proper citation of author ☝️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment