Skip to content

Commit

Permalink
edit regex for program id capture
Browse files Browse the repository at this point in the history
  • Loading branch information
ShrinathNR committed Nov 25, 2024
1 parent e6efd73 commit 25e4652
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ fn update_program_id_in_ts(file_path: &Path, program_id: &str) -> Result<()> {
.context("Failed to read TypeScript file")?;

// Create a regex that matches both possible patterns
let re = RegexBuilder::new(r#"static PROGRAM_ID = new Pubkey\("([^"]*)"\)"#)
let re = RegexBuilder::new(r#"static PROGRAM_ID = new Pubkey\(["']([^"']*)["']\)"#)
.case_insensitive(true)
.build()
.context("Failed to create regex")?;
Expand Down

0 comments on commit 25e4652

Please sign in to comment.