Unverified Commit 394239e3 authored by Octomerger Bot's avatar Octomerger Bot Committed by GitHub
Browse files

Merge pull request #7671 from github/repo-sync

repo sync
parents 4823161f d4795d25
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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 = {}
@@ -99,6 +99,6 @@ function removeNewlinesFromInlineTags (html) {
  return $('body').html()
}

Object.assign(module.exports, {
  liquid
})
renderContent.liquid = liquid

module.exports = renderContent
+0 −1
Original line number Diff line number Diff line
@@ -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: {
+4 −2
Original line number Diff line number Diff line
@@ -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)
  }
@@ -18,4 +18,6 @@ module.exports = function renderPageWithNext (req, res, next) {
  next()
}

module.exports.nextHandleRequest = nextHandleRequest
renderPageWithNext.nextHandleRequest = nextHandleRequest

module.exports = renderPageWithNext
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ describe('siteData module (English)', () => {
    done()
  })

  test('exports an object', async () => {
  test('makes an object', async () => {
    expect(isPlainObject(data)).toBe(true)
  })

+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