fix(docs): update healthcheck test script on docs, resolves #3027

This commit is contained in:
Amruth Pillai
2026-05-11 00:09:07 +02:00
parent 83a407bc10
commit 0abee1048c
5 changed files with 35 additions and 7 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
import type { FontWeight } from "@reactive-resume/fonts";
import type { Typography } from "@reactive-resume/schema/resume/data";
import { Font } from "@react-pdf/renderer";
import { all as cjk } from "cjk-regex";
import {
getFont,
getPdfCjkFallbackFontFamily,
@@ -66,7 +67,7 @@ const resolvePdfTypography = (typography: Typography): Typography => {
export const registerFonts = (typography: Typography): PdfTypography => {
Font.registerHyphenationCallback((word) => {
if (word.match(/\p{Script=Han}/u)) return word.split("").flatMap((l) => [l, ""]);
if (cjk().toRegExp().test(word)) return word.split("").flatMap((l) => [l, ""]);
return [word];
});