From c71ca522d8f8815c31c7a70c627aa23d40c15f41 Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Wed, 13 May 2020 17:34:21 -0700 Subject: [PATCH] fix(gatsby-recipes): format code blocks without indentation as that makes copy/paste difficult --- packages/gatsby-recipes/src/cli.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/gatsby-recipes/src/cli.js b/packages/gatsby-recipes/src/cli.js index ad3110338f55b..492ec38ba1e67 100644 --- a/packages/gatsby-recipes/src/cli.js +++ b/packages/gatsby-recipes/src/cli.js @@ -205,9 +205,8 @@ const components = { language = props.className.split(`-`)[1] } const children = hicat(props.children.trim(), { lang: language }) - const regex = /^/gm - const ansi = children.ansi.replace(regex, `ยทยท `) + const ansi = `\`\`\`${language}\n${children.ansi}\n\`\`\`` return (