aboutsummaryrefslogtreecommitdiff
path: root/scripts/apidoc
diff options
context:
space:
mode:
authorrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>2024-01-02 14:05:46 +0100
committerGitHub <[email protected]>2024-01-02 14:05:46 +0100
commitde5d07e6e32157b9ca208fc12f3fef635d50f2f3 (patch)
treefe55b28ac7a4917167858d68e4b0e6cae78b1850 /scripts/apidoc
parent34f11d5405479e201e6d13ca3f907aede72a46b2 (diff)
downloadfaker-de5d07e6e32157b9ca208fc12f3fef635d50f2f3.tar.xz
faker-de5d07e6e32157b9ca208fc12f3fef635d50f2f3.zip
chore(deps): update dependency vitepress to v1.0.0-rc.34 (#2592)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: ST-DDT <[email protected]>
Diffstat (limited to 'scripts/apidoc')
-rw-r--r--scripts/apidoc/markdown.ts9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/apidoc/markdown.ts b/scripts/apidoc/markdown.ts
index 88df0150..870b4201 100644
--- a/scripts/apidoc/markdown.ts
+++ b/scripts/apidoc/markdown.ts
@@ -39,10 +39,15 @@ const htmlSanitizeOptions: sanitizeHtml.IOptions = {
function comparableSanitizedHtml(html: string): string {
return html
+ .replace(/&#x[0-9A-F]{2};/g, (x) =>
+ String.fromCodePoint(Number.parseInt(x.slice(3, -1), 16))
+ )
.replace(/&gt;/g, '>')
- .replace(/ /g, '')
+ .replace(/&lt;/g, '<')
+ .replace(/&amp;/g, '&')
.replace(/&quot;/g, '"')
- .replace(/&#39;/g, "'");
+ .replace(/=""/g, '')
+ .replace(/ /g, '');
}
/**