Skip to content

Commit

Permalink
Update injectLoader.js (#20719)
Browse files Browse the repository at this point in the history
Accounts for public entry functions

## Description 

Describe the changes or additions included in this PR.

## Test plan 

How did you test the new or updated feature?

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] gRPC:
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
  • Loading branch information
techdebt-99 authored Dec 23, 2024
1 parent 4d4af19 commit 75a20fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/site/src/plugins/inject-code/injectLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`;
}
Expand Down

0 comments on commit 75a20fa

Please sign in to comment.