From dfb46ec7cc629ff8390fa768112292a374ed6a57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Poupard?= Date: Thu, 1 Oct 2020 17:29:51 +0200 Subject: [PATCH] docs(prism): WTF null as a string --- a11y.css.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/a11y.css.js b/a11y.css.js index cff18df3..f580a661 100644 --- a/a11y.css.js +++ b/a11y.css.js @@ -104,14 +104,13 @@ const parseSassComment = comment => { const htmlRegex = /((.[\s\S]+?)<\/code>)/gm let htmlContent = processedContent.match(htmlRegex) - let processedHTML = prism.highlight(htmlContent, prism.languages.html, 'html') + let processedHTML = prism.highlight(String(htmlContent), prism.languages.html, 'html') const cssRegex = /((.[\s\S]+?)<\/code>)/gm let cssContent = processedContent.match(cssRegex) - let processedCSS = prism.highlight(cssContent, prism.languages.css, 'css') + let processedCSS = prism.highlight(String(cssContent), prism.languages.css, 'css') processedContent = processedContent.replace(htmlRegex, processedHTML) processedContent = processedContent.replace(cssRegex, processedCSS) - console.log(processedContent) return { attributes: content.attributes,