diff --git a/code/renderers/react/src/docs/jsxDecorator.tsx b/code/renderers/react/src/docs/jsxDecorator.tsx index e43702daf02f..3395a3860557 100644 --- a/code/renderers/react/src/docs/jsxDecorator.tsx +++ b/code/renderers/react/src/docs/jsxDecorator.tsx @@ -130,7 +130,7 @@ export const renderJsx = (code: React.ReactElement, options: JSXOptions) => { return string; }).join('\n'); - return result.replace(/function\s+noRefCheck\(\)\s+\{\}/g, '() => {}'); + return result.replace(/function\s+noRefCheck\(\)\s*\{\}/g, '() => {}'); }; const defaultOpts = {