Skip to content

Instantly share code, notes, and snippets.

@taxigy
Created April 20, 2017 16:39
Show Gist options
  • Save taxigy/01418db23060d6601ddeb895651a43ab to your computer and use it in GitHub Desktop.
Save taxigy/01418db23060d6601ddeb895651a43ab to your computer and use it in GitHub Desktop.
Prettier problem
// IN
const renderIndexPage = data => indexPage.replace('<!-- {{ data }} -->', `
<script>
window.CONTENTFUL_DATA = ${data};
</script>
`);
// OUT
const renderIndexPage = data =>
indexPage.replace(
"<!-- {{ data }} -->",
`
<script>
window.CONTENTFUL_DATA = ${data};
</script>
`
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment