fix: syntax highlighting indentation

This commit is contained in:
sylv 2022-11-01 19:47:15 +08:00
parent d3de37a11b
commit 2f6cb9ed15
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ export const SyntaxHighlighter = memo<SyntaxHighlighterProps>(
<SyntaxHighlighterControls language={language} onLanguageChange={setLanguage} content={children} />
{tokens.map((line, index) => {
const props = getLineProps({ line, key: index });
const classes = classNames(props.className, 'table-row');
const classes = classNames(props.className, 'table-row whitespace-pre-wrap');
return (
// handled by getLineProps