Skip to content

Commit

Permalink
Fix bad character escape sequence in typography.js on Windows (#1801)
Browse files Browse the repository at this point in the history
  • Loading branch information
JGameCreation authored and KyleAMathews committed Aug 14, 2017
1 parent a1837dd commit 5fd80aa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/gatsby-plugin-typography/src/gatsby-node.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const fs = require(`fs`)
const path = require(`path`)
const os= require(`os`)

// Write out a typography module to .cache.

Expand All @@ -13,6 +14,9 @@ exports.sourceNodes = ({ store }, pluginOptions) => {
program.directory,
pluginOptions.pathToConfigModule
)}")`
if(os.platform() == `win32`){
module = module.split(`\\`).join(`\\\\`)
}
} else {
module = `const Typography = require("typography")
const typography = new Typography()
Expand Down

0 comments on commit 5fd80aa

Please sign in to comment.