From 42ba857423c8914ea12918f1cc5c639139e73873 Mon Sep 17 00:00:00 2001 From: LittleboyHarry Date: Thu, 8 Sep 2022 21:42:05 +0800 Subject: [PATCH] fix(theme): preserve line breaks when copying code with showLineNumbers in Firefox (#8068) Fix CodeBlock no line breaks copied in Firefox bug --- .../src/theme/CodeBlock/Line/index.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Line/index.tsx b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Line/index.tsx index 3b6a8a306b0a..3d8fca58fdcc 100644 --- a/packages/docusaurus-theme-classic/src/theme/CodeBlock/Line/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/CodeBlock/Line/index.tsx @@ -39,11 +39,9 @@ export default function CodeBlockLine({ {lineTokens} ) : ( - <> - {lineTokens} -
- + lineTokens )} +
); }