Skip to content

Commit

Permalink
refactror: improve docs genertaing for ext libs
Browse files Browse the repository at this point in the history
  • Loading branch information
b00ste committed Aug 4, 2023
1 parent 2389e35 commit ff537c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ async function generateDocumentation(hre: HardhatRuntimeEnvironment): Promise<vo

const doc: Doc = {
...decodeAbi(info.abi),
path: source.substr(sourcesPath.length).split('/').slice(0, -1).join('/'),
path: source.startsWith('@')
? source.substring(source.lastIndexOf('/') + 1, source.indexOf('.sol'))
: source.substring(sourcesPath.length).split('/').slice(0, -1).join('/'),
}; // get file path without filename

// Fetches info from userdoc
Expand Down

0 comments on commit ff537c4

Please sign in to comment.