Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return cy.getMarkdownEditor().should(([element]) => {
// Slate makes the following representations:
// - blank line: 2 BOM's + <br>
// - blank element (placed inside empty elements): 1 BOM + <br>
// We replace to represent a blank line as a single <br>, and remove the
// contents of elements that are actually empty.
const actualDomString = toPlainTree(element.innerHTML)
.replace(/\uFEFF\uFEFF<br>/g, '<br>')
.replace(/\uFEFF<br>/g, '');
expect(actualDomString).toEqual(oneLineTrim(expectedDomString));
});
});
${body.raw ? generateRawTags(body.raw) : ''}
${body.scripts ? generateScriptTags(body.scripts) : ''}
${generateJSReferences(js, publicPath)}`
const doc = ctags.html(
template({
title,
description,
lang,
head: headStr,
footer: footerStr,
publicUrl: getPublicUrl(config, dev),
})
)
return trimWhitespace ? ctags.oneLineTrim(doc) : emptyLineTrim(doc)
}
.get('/*', (req, res) => {
const extractor = new ChunkExtractor({
statsFile: path.resolve('build/loadable-stats.json'),
entrypoints: ['client'],
})
const html = renderToString(
,
)
res.status(200).send(
oneLineTrim(htmlTemplate`
<title>Welcome to Razzle</title>
${extractor.getLinkTags()}
${extractor.getStyleTags()}
<div id="root">${html}</div>
${extractor.getScriptTags()}
`),