Skip to content

Commit

Permalink
cli: Improve converting non-conflicting paths to names in IDL (#2588)
Browse files Browse the repository at this point in the history
  • Loading branch information
acheroncrypto authored Aug 2, 2023
1 parent be8764b commit 2af9cc6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2458,7 +2458,7 @@ fn generate_idl_build(no_docs: bool) -> Result<Vec<Idl>> {
let replaced_idl = modified_idl.replace(path, &format!(r#""{name}""#));

// Check whether there is a conflict
let has_conflict = replaced_idl.contains(&format!("::{name}"));
let has_conflict = replaced_idl.contains(&format!(r#"::{name}""#));
if !has_conflict {
modified_idl = replaced_idl;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/idl/idls/build.json
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@
}
},
{
"name": "idl::State",
"name": "State",
"docs": [
"An account containing various fields"
],
Expand Down

1 comment on commit 2af9cc6

@vercel
Copy link

@vercel vercel bot commented on 2af9cc6 Aug 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

anchor-docs – ./

anchor-docs-200ms.vercel.app
anchor-docs-git-master-200ms.vercel.app
anchor-lang.com
www.anchor-lang.com

Please sign in to comment.