From 058732dfa4ccdd895d38a399110df7d49bc8f02d Mon Sep 17 00:00:00 2001 From: Pedro Nauck Date: Thu, 11 Jul 2019 09:32:45 -0300 Subject: [PATCH] fix(remark-docz): fix alias in the src of a mdx's image #897 --- core/remark-docz/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/remark-docz/src/index.ts b/core/remark-docz/src/index.ts index 0fdee0ef4..980ea5e50 100644 --- a/core/remark-docz/src/index.ts +++ b/core/remark-docz/src/index.ts @@ -77,7 +77,7 @@ const createImgSrc = (src: string) => { } let { pathname } = parsed as { pathname: string } - if (!/^\.[./]+/.test(pathname)) { + if (!/^(?:\.[./]+|@)/.test(pathname)) { pathname = `./${pathname}` } return t.jsxExpressionContainer(