Skip to content

Commit 88969b9

Browse files
committed
Add types for normalizeP5ReferenceLinks helper
1 parent 6448745 commit 88969b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/layouts/ReferenceItemLayout.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ const { showBanner, englishUrl } = checkTranslationBanner(
9292
);
9393
// Normalizes malformed p5.* reference anchors (e.g. "#/p5.Element")
9494
// to proper reference routes ("/reference/p5/p5.Element/")
95-
function normalizeP5ReferenceLinks(html) {
95+
function normalizeP5ReferenceLinks(html: string | undefined): string | undefined {
9696
if (!html) return html;
9797
return html.replace(
9898
/href="#\/(p5\.[^"]+)"/g,

0 commit comments

Comments
 (0)