File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,10 +20,10 @@ export function resolveMarkdownRelativeLinks(
2020 * RegExp is used to avoid replacing texts in markdown links and targets only `href` and `src` attributes
2121 * @example [link](./image.png) => [link](https://cdn.com/image.png)
2222 * @example [./src/file.ts](./src/file.ts) => [./src/file.ts](https://cdn.com/src/file.ts)
23- */
24- const searchRegExp = new RegExp ( `(?<before>[^[])(?<url>${ path } )` , "g" ) // [^[] matches any character except [
23+ */
24+ const searchRegExp = new RegExp ( `(?<before>[^[])(?<url>${ path } )` , "g" ) ; // [^[] matches any character except [
2525 return match . replace ( searchRegExp , ( _ , before , url ) => {
26- return `${ before } ${ cdnBaseURL } /${ url . replace ( / ^ \. \/ / , "" ) } `
26+ return `${ before } ${ cdnBaseURL } /${ url . replace ( / ^ \. \/ / , "" ) } ` ;
2727 } ) ;
2828 } ,
2929 ) ;
You can’t perform that action at this time.
0 commit comments