Skip to content

Instantly share code, notes, and snippets.

@DanyelMorales
Created December 12, 2018 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DanyelMorales/1cd548ca4f322f39f696e5e421cab426 to your computer and use it in GitHub Desktop.
Save DanyelMorales/1cd548ca4f322f39f696e5e421cab426 to your computer and use it in GitHub Desktop.
replace spaces for line endings
var apiData = JSON.stringify(blocks, null, 2);
apiData = apiData.replace(/(\r\n|\n|\r)/g, app.options.lineEnding);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment