diff --git a/src/scripts/builders/reference.ts b/src/scripts/builders/reference.ts index 9661593086..67f99d43b8 100644 --- a/src/scripts/builders/reference.ts +++ b/src/scripts/builders/reference.ts @@ -152,7 +152,7 @@ const correctRelativeLinksToExampleAssets = ( return content; } return Array.isArray(content) - ? content.map((ex) => ex.replaceAll("assets/", "/assets/")) + ? content.map((ex) => ex.replaceAll("assets/", "/assets/").replaceAll(/\n$/g, "")) : content.replaceAll("assets/", "/assets/"); };