Created
          November 10, 2022 16:09 
        
      - 
      
 - 
        
Save tayiorbeii/da7c407d29c28f0b69dab7a0a5e0f459 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" | |
| // Name: | |
| let outdent = await npm('tiny-dedent') | |
| let replaceAll = await npm('just-replace-all') | |
| let chunkArray = await npm('chunk') | |
| let text = await paste() | |
| let outdentedTextLines = text.split('\n') | |
| let paragraphsArray = chunkArray(outdentedTextLines, 4) | |
| let paragraphs = paragraphsArray.flat().map(x => x.replaceAll(/\[(?:(?:([0-9]?\d|[0-9]):)?([0-9]?\d):)?([0-9]?\d)]/g, '').trim()).join('\n') | |
| await copy(paragraphs) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment