Skip to content

Commit

Permalink
docs: update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Barbapapazes committed Jan 10, 2024
1 parent 39460fc commit ca9be8b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions utils/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(`(?<before>[^[])(?<url>${path})`, "g") // [^[] matches any character except [
return match.replace(searchRegExp, (_, before, url) => {
Expand Down

0 comments on commit ca9be8b

Please sign in to comment.