File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -65,17 +65,20 @@ function parseCertTable(md) {
6565
6666function 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
7172function extractUrlFromMd ( s ) {
7273 if ( ! s ) return "" ;
73- // match (https://...)
74- const m = s . match ( / \( ( h t t p s ? : \/ \/ [ ^ \) ] + ) \) / ) ;
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 ( / \[ .* ?\] \( ( h t t p s ? : \/ \/ [ ^ \) ] + ) \) / ) ;
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 ( / h t t p s ? : \/ \/ \S + / ) ;
78- if ( m2 ) return decodeSafe ( m2 [ 0 ] ) ;
80+ if ( m2 ) return m2 [ 0 ] ;
81+
7982 return "" ;
8083}
8184
You can’t perform that action at this time.
0 commit comments