Skip to content

Commit dad1cfb

Browse files
authored
Update certManager.js
1 parent 06dce11 commit dad1cfb

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

web/certManager.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,20 @@ function parseCertTable(md) {
6565

6666
function stripMd(s) {
6767
if (!s) return "";
68-
return s.replace(/\*\*/g, "").replace(/\[|\]/g, "").trim();
68+
// only remove bold markers **, leave links intact
69+
return s.replace(/\*\*/g, "").trim();
6970
}
7071

7172
function extractUrlFromMd(s) {
7273
if (!s) return "";
73-
// match (https://...)
74-
const m = s.match(/\((https?:\/\/[^\)]+)\)/);
75-
if (m && m[1]) return decodeSafe(m[1]);
76-
// sometimes the link isn't wrapped in parentheses, try to find plain url
74+
// match Markdown link (exact URL)
75+
const m = s.match(/\[.*?\]\((https?:\/\/[^\)]+)\)/);
76+
if (m && m[1]) return m[1]; // return exact URL from README.md
77+
78+
// fallback: if plain URL exists, just use it
7779
const m2 = s.match(/https?:\/\/\S+/);
78-
if (m2) return decodeSafe(m2[0]);
80+
if (m2) return m2[0];
81+
7982
return "";
8083
}
8184

0 commit comments

Comments
 (0)