File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -79,18 +79,16 @@ function transformMdBody(body: string, ctx: Context) {
7979 // convert Markdown links that work in Github (relative paths) into full URIs
8080 // that Astro JS needs, including the ICU4X prefix
8181 let { icu4xVersion, icu4xVersionStr, sitePrefix } = ctx ;
82-
83- // replacementBody = replacementBody.replace(/(\[.*\])\((?!http)(.*)\)/g, "$1(" + sitePrefix + "/" + icu4xVersionStr + "/$2)");
84-
85- // in a relative link to a Markdown file, get rid of the trailing `.md`
86- replacementBody = replacementBody . replace ( / ( \[ .* \] ) \( (? ! h t t p ) ( .* ) \. m d \) / g, "$1(" + sitePrefix + "/" + icu4xVersionStr + "/$2)" ) ;
8782
8883 // in a relative link to any other file, format the URL to the Github blob
8984 replacementBody = replacementBody . replace (
9085 / \] \( (? ! h t t p ) ( [ ^ \) ] * ) (?< ! .m d ) \) / g,
9186 "](" + "https://github.com/unicode-org/icu4x/tree/icu%40" + icu4xVersion + "/tutorials/$1)"
9287 ) ;
9388
89+ // in a relative link to a Markdown file, get rid of the trailing `.md`
90+ replacementBody = replacementBody . replace ( / ( \[ .* \] ) \( (? ! h t t p ) ( .* ) \. m d \) / g, "$1(" + sitePrefix + "/" + icu4xVersionStr + "/$2)" ) ;
91+
9492 return replacementBody ;
9593}
9694
You can’t perform that action at this time.
0 commit comments