Skip to content

Commit 5a71dfc

Browse files
committed
docs(site): address release nav feedback
1 parent 364f7fe commit 5a71dfc

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

docs/.vitepress/config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ import miseTomlGrammar from "./grammars/mise-toml.tmLanguage.json";
1515
const configDir = dirname(fileURLToPath(import.meta.url));
1616
const cargoToml = readFileSync(resolve(configDir, "../../Cargo.toml"), "utf8");
1717
const versionMatch = cargoToml.match(
18-
/\[package\][\s\S]*?\nversion\s*=\s*"([^"]+)"/,
18+
/^\[package\][\s\S]*?^\s*version\s*=\s*"([^"]+)"/m,
1919
);
20+
if (!versionMatch) {
21+
console.warn("Unable to find package version in Cargo.toml");
22+
}
2023
const latestVersion = versionMatch?.[1] ?? "0.0.0";
2124

2225
// https://vitepress.dev/reference/site-config

0 commit comments

Comments
 (0)