We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 364f7fe commit 5a71dfcCopy full SHA for 5a71dfc
1 file changed
docs/.vitepress/config.ts
@@ -15,8 +15,11 @@ import miseTomlGrammar from "./grammars/mise-toml.tmLanguage.json";
15
const configDir = dirname(fileURLToPath(import.meta.url));
16
const cargoToml = readFileSync(resolve(configDir, "../../Cargo.toml"), "utf8");
17
const versionMatch = cargoToml.match(
18
- /\[package\][\s\S]*?\nversion\s*=\s*"([^"]+)"/,
+ /^\[package\][\s\S]*?^\s*version\s*=\s*"([^"]+)"/m,
19
);
20
+if (!versionMatch) {
21
+ console.warn("Unable to find package version in Cargo.toml");
22
+}
23
const latestVersion = versionMatch?.[1] ?? "0.0.0";
24
25
// https://vitepress.dev/reference/site-config
0 commit comments