fix(theme): preserve line breaks when copying code with showLineNumbers in Firefox (#8068)

Fix CodeBlock no line breaks copied in Firefox bug
This commit is contained in:
LittleboyHarry 2022-09-08 21:42:05 +08:00 committed by GitHub
parent 275f509d13
commit 710c0c58f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,11 +39,9 @@ export default function CodeBlockLine({
<span className={styles.codeLineContent}>{lineTokens}</span>
</>
) : (
<>
{lineTokens}
<br />
</>
lineTokens
)}
<br />
</span>
);
}