diff --git a/utils/markdown.ts b/utils/markdown.ts index de6476e..52791c6 100644 --- a/utils/markdown.ts +++ b/utils/markdown.ts @@ -20,6 +20,7 @@ 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) + * @example ./src/file.ts => https://cdn.com/src/file.ts */ const searchRegExp = new RegExp(`(?[^[])(?${path})`, "g") // [^[] matches any character except [ return match.replace(searchRegExp, (_, before, url) => {