Skip to content

Commit

Permalink
chore: apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Jan 10, 2024
1 parent 39460fc commit 6f6f300
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ export function resolveMarkdownRelativeLinks(
* RegExp is used to avoid replacing texts in markdown links and targets only `href` and `src` attributes
* @example [link](./image.png) => [link](https://cdn.com/image.png)
* @example [./src/file.ts](./src/file.ts) => [./src/file.ts](https://cdn.com/src/file.ts)
*/
const searchRegExp = new RegExp(`(?<before>[^[])(?<url>${path})`, "g") // [^[] matches any character except [
*/
const searchRegExp = new RegExp(`(?<before>[^[])(?<url>${path})`, "g"); // [^[] matches any character except [
return match.replace(searchRegExp, (_, before, url) => {
return `${before}${cdnBaseURL}/${url.replace(/^\.\//, "")}`
return `${before}${cdnBaseURL}/${url.replace(/^\.\//, "")}`;
});
},
);
Expand Down

0 comments on commit 6f6f300

Please sign in to comment.