We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 09fc1eb + fc7d9cb commit ffa9309Copy full SHA for ffa9309
apps/frontpage/components/docs/mdx/img.tsx
@@ -15,9 +15,7 @@ interface ImgProps extends ImageProps {
15
}
16
17
export function Img({ src, alt, activeVersion }: ImgProps) {
18
- const pathWithoutRoot = src
19
- ?.replace('../../_assets/', '')
20
- .replace('../_assets/', '');
+ const pathWithoutRoot = src?.replace(/^(?:\.\.\/)+_assets\//, '');
21
const path = `/docs-assets/${activeVersion}/${pathWithoutRoot ?? ''}`;
22
const localPath = `public${path}`;
23
0 commit comments