diff --git a/gatsby-config.js b/gatsby-config.js index 1b8d122e..ed0799f3 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -34,7 +34,7 @@ module.exports = { resolve: 'gatsby-source-filesystem', options: { name: 'pages', - path: `${__dirname}/src/pages` + path: `${__dirname}/src/pages`, }, }, { diff --git a/plugins/gatsby-transformer-home-example-code/gatsby-node.js b/plugins/gatsby-transformer-home-example-code/gatsby-node.js index 172ea06f..d9659dfa 100644 --- a/plugins/gatsby-transformer-home-example-code/gatsby-node.js +++ b/plugins/gatsby-transformer-home-example-code/gatsby-node.js @@ -1,18 +1,23 @@ -const crypto = require(`crypto`) +const crypto = require(`crypto`); // docblock goes here -const createContentDigest = obj => crypto - .createHash(`md5`) - .update(obj) - .digest(`hex`) +const createContentDigest = obj => + crypto + .createHash(`md5`) + .update(obj) + .digest(`hex`); // Store code snippets in GraphQL for the home page examples. // Snippets will be matched with markdown templates of the same name. exports.onCreateNode = async ({node, loadNodeContent, actions}) => { const {createNode} = actions; - const {absolutePath, ext, name, relativeDirectory, sourceInstanceName} = node + const {absolutePath, ext, name, relativeDirectory, sourceInstanceName} = node; - if (sourceInstanceName === 'content' && relativeDirectory === 'home/examples' && ext === '.js') { + if ( + sourceInstanceName === 'content' && + relativeDirectory === 'home/examples' && + ext === '.js' + ) { const code = await loadNodeContent(node); createNode({ id: name, diff --git a/src/components/CodeEditor/CodeEditor.js b/src/components/CodeEditor/CodeEditor.js index b199af5a..e5ebb80c 100644 --- a/src/components/CodeEditor/CodeEditor.js +++ b/src/components/CodeEditor/CodeEditor.js @@ -65,8 +65,10 @@ class CodeEditor extends Component { } return ( -
$1
');
-
- ReactDOM.render(
-