diff --git a/action.yml b/action.yml index 471b2d9..373373f 100644 --- a/action.yml +++ b/action.yml @@ -273,7 +273,7 @@ runs: BEGIN { printing=0 } /^## / { if (printing) exit - if (index($0, ver) > 0) { printing=1; next } + if ($0 ~ "^## " ver "[ (]") { printing=1; next } } printing { print } ' "$changelog_file") diff --git a/src/ecosystems/rust.rs b/src/ecosystems/rust.rs index f7a5baf..8b7152f 100644 --- a/src/ecosystems/rust.rs +++ b/src/ecosystems/rust.rs @@ -236,7 +236,8 @@ impl RustAdapter { let candidate = current.join("Cargo.toml"); if candidate.exists() && candidate != manifest_path { let content = std::fs::read_to_string(&candidate)?; - if content.contains("[workspace]") { + let doc: DocumentMut = content.parse()?; + if doc.get("workspace").is_some() { return Ok(current); } }