From b2112c3bee0a0818e6db22c317b010764074bcbe Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Mon, 25 Nov 2024 10:33:09 +0000 Subject: [PATCH] Update src/lib/plugins/mdbook-example-import.ts Co-authored-by: Anderson Arboleya --- src/lib/plugins/mdbook-example-import.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/plugins/mdbook-example-import.ts b/src/lib/plugins/mdbook-example-import.ts index 614be0f50..7f3f7b64c 100644 --- a/src/lib/plugins/mdbook-example-import.ts +++ b/src/lib/plugins/mdbook-example-import.ts @@ -91,7 +91,7 @@ export function handleExampleImports( } else if (node.type === 'text') { // handle ts-sdk docs example format const relativePath = dirname.replace('docs/fuels-ts/', '') - filePath = filePath.replace('<<< @./', `${relativePath}/`).replace('<<< @/', '').replace('<<< @', ''); + filePath = filePath.replace('<<< @./', `${relativePath}/`).replace(/<<< @\/?/, ''); const pathData = filePath.split('{'); filePath = pathData[0];