diff --git a/packages/docusaurus-mdx-loader/src/remark/unusedDirectives/index.ts b/packages/docusaurus-mdx-loader/src/remark/unusedDirectives/index.ts index f8097089270a..94650572e46f 100644 --- a/packages/docusaurus-mdx-loader/src/remark/unusedDirectives/index.ts +++ b/packages/docusaurus-mdx-loader/src/remark/unusedDirectives/index.ts @@ -68,7 +68,9 @@ const plugin: Plugin = function plugin(this: Processor): Transformer { const customPath = posixPath(path.relative(process.cwd(), file.path)); - return logger.interpolate`We found a potential error in your documentation name=${unusedDirective.name} path=${customPath}:${positionMessage}`; + return logger.interpolate`We found a potential error in your documentation name=${ + unusedDirective.name + } path=${`${customPath}:${positionMessage}`}`; }) .join('\n'); logger.warn(warningMessage);