Loading lib/render-content/renderContent.js +4 −4 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ const inlineTagString = `(?:${inlineTags.join('|')})` const inlineTagRegex = new RegExp(`\n?(</?${inlineTagString}>?)\n?`, 'gm') // parse multiple times because some templates contain more templates. :] module.exports = async function renderContent ( async function renderContent ( template = '', context = {}, options = {} Loading Loading @@ -99,6 +99,6 @@ function removeNewlinesFromInlineTags (html) { return $('body').html() } Object.assign(module.exports, { liquid }) renderContent.liquid = liquid module.exports = renderContent middleware/csp.js +0 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,6 @@ const isArchivedVersion = require('../lib/is-archived-version') const versionSatisfiesRange = require('../lib/version-satisfies-range') const AZURE_STORAGE_URL = 'githubdocs.azureedge.net' // module.exports = contentSecurityPolicy({ module.exports = function csp (req, res, next) { const csp = { directives: { Loading middleware/next.js +4 −2 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ if (FEATURE_NEXTJS) { nextApp.prepare() } module.exports = function renderPageWithNext (req, res, next) { function renderPageWithNext (req, res, next) { if (req.path.startsWith('/_next') && !req.path.startsWith('/_next/data')) { return nextHandleRequest(req, res) } Loading @@ -18,4 +18,6 @@ module.exports = function renderPageWithNext (req, res, next) { next() } module.exports.nextHandleRequest = nextHandleRequest renderPageWithNext.nextHandleRequest = nextHandleRequest module.exports = renderPageWithNext tests/content/site-data.js +1 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ describe('siteData module (English)', () => { done() }) test('exports an object', async () => { test('makes an object', async () => { expect(isPlainObject(data)).toBe(true) }) Loading tests/helpers/supertest.js +1 −1 Original line number Diff line number Diff line // This file exports an object with utility functions for re-use in // This file makes an object with utility functions for re-use in // multiple test files const cheerio = require('cheerio') Loading Loading
lib/render-content/renderContent.js +4 −4 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ const inlineTagString = `(?:${inlineTags.join('|')})` const inlineTagRegex = new RegExp(`\n?(</?${inlineTagString}>?)\n?`, 'gm') // parse multiple times because some templates contain more templates. :] module.exports = async function renderContent ( async function renderContent ( template = '', context = {}, options = {} Loading Loading @@ -99,6 +99,6 @@ function removeNewlinesFromInlineTags (html) { return $('body').html() } Object.assign(module.exports, { liquid }) renderContent.liquid = liquid module.exports = renderContent
middleware/csp.js +0 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,6 @@ const isArchivedVersion = require('../lib/is-archived-version') const versionSatisfiesRange = require('../lib/version-satisfies-range') const AZURE_STORAGE_URL = 'githubdocs.azureedge.net' // module.exports = contentSecurityPolicy({ module.exports = function csp (req, res, next) { const csp = { directives: { Loading
middleware/next.js +4 −2 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ if (FEATURE_NEXTJS) { nextApp.prepare() } module.exports = function renderPageWithNext (req, res, next) { function renderPageWithNext (req, res, next) { if (req.path.startsWith('/_next') && !req.path.startsWith('/_next/data')) { return nextHandleRequest(req, res) } Loading @@ -18,4 +18,6 @@ module.exports = function renderPageWithNext (req, res, next) { next() } module.exports.nextHandleRequest = nextHandleRequest renderPageWithNext.nextHandleRequest = nextHandleRequest module.exports = renderPageWithNext
tests/content/site-data.js +1 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ describe('siteData module (English)', () => { done() }) test('exports an object', async () => { test('makes an object', async () => { expect(isPlainObject(data)).toBe(true) }) Loading
tests/helpers/supertest.js +1 −1 Original line number Diff line number Diff line // This file exports an object with utility functions for re-use in // This file makes an object with utility functions for re-use in // multiple test files const cheerio = require('cheerio') Loading