1
0
mirror of synced 2025-12-19 18:10:59 -05:00

use xmlMode when loading cheerio

This commit is contained in:
Sarah Schneider
2020-11-30 11:49:28 -05:00
parent d0efefdc21
commit 21f0de573e

View File

@@ -25,7 +25,7 @@ module.exports = async function prerenderObjects (schemaJsonPerVersion, version)
for (const object of schemaJsonPerVersion.objects) {
context.item = object
const objectHtml = await liquid.parseAndRender(objectIncludeFile, context)
const $ = cheerio.load(objectHtml)
const $ = cheerio.load(objectHtml, { xmlMode: true })
rewriteLocalLinks($, version, currentLanguage)
const htmlWithVersionedLinks = $.html()
objectsArray.push(htmlWithVersionedLinks)