From de60f891491934efafb9b519a236e72628cb8f11 Mon Sep 17 00:00:00 2001 From: techdebt-99 <150741822+techdebt-99@users.noreply.github.com> Date: Mon, 23 Dec 2024 10:20:02 -0600 Subject: [PATCH] Update injectLoader.js Accounts for public entry functions --- docs/site/src/plugins/inject-code/injectLoader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/site/src/plugins/inject-code/injectLoader.js b/docs/site/src/plugins/inject-code/injectLoader.js index 4c7629338b4b4..23a0694243da7 100644 --- a/docs/site/src/plugins/inject-code/injectLoader.js +++ b/docs/site/src/plugins/inject-code/injectLoader.js @@ -103,7 +103,7 @@ const addCodeInject = function (source) { fn = fn.trim(); let funStr = ""; if (isMove) { - funStr = `^(\\s*)*?(pub(lic)? )?fu?n \\b${fn}\\b.*?}\\n(\\s*?})?(?=\\n)?`; + funStr = `^(\\s*)*?(pub(lic)? )?(entry )?fu?n \\b${fn}\\b.*?}\\n(\\s*?})?(?=\\n)?`; } else if (isTs) { funStr = `^(\\s*)(async )?(export (default )?)?function \\b${fn}\\b.*?\\n\\1}\\n`; }