Prettier fix for ce338fff64

This commit is contained in:
Joel Marcey 2017-12-20 10:07:57 -08:00
parent ce338fff64
commit 665b2da09f
2 changed files with 13 additions and 5 deletions

View file

@ -452,7 +452,11 @@ function execute() {
const targetFile = join(buildDir, parts[1]);
const str = renderToStaticMarkup(
<Site language="en" config={siteConfig}>
<div dangerouslySetInnerHTML={{__html: fs.readFileSync(file, { encoding: "utf8" })}} />
<div
dangerouslySetInnerHTML={{
__html: fs.readFileSync(file, {encoding: 'utf8'}),
}}
/>
</Site>
);

View file

@ -372,17 +372,21 @@ function execute(port) {
)
) {
if (siteConfig.wrapPagesHTML) {
removeModuleAndChildrenFromCache("../core/Site.js");
const Site = require("../core/Site.js");
removeModuleAndChildrenFromCache('../core/Site.js');
const Site = require('../core/Site.js');
const str = renderToStaticMarkup(
<Site language="en" config={siteConfig}>
<div dangerouslySetInnerHTML={{__html: fs.readFileSync(htmlFile, { encoding: "utf8" })}} />
<div
dangerouslySetInnerHTML={{
__html: fs.readFileSync(htmlFile, {encoding: 'utf8'}),
}}
/>
</Site>
);
res.send(str);
} else {
res.send(fs.readFileSync(htmlFile, { encoding: "utf8" }));
res.send(fs.readFileSync(htmlFile, {encoding: 'utf8'}));
}
return;
}