Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs: update examples
  • Loading branch information
Barbapapazes committed Jan 10, 2024
commit ca9be8b31ec956e55ed5e63d242015e4d1005295
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