{lines
.flatMap((line, lineIndex) => {
const columns = line.split(' ');
return [
{columns.map((column, columnIndex) => (
{column}
{columnIndex < columns.length - 1 && }
))}
,
// Add a break line so the text content is formatted correctly
// when copying to clipboard
'\n',
];
})
// Here we remove that empty line from before and
// the last flatMap entry which is an `\n`
.slice(0, -2)}
);
};
type CodeBoxProps = { language: string; showCopyButton?: boolean };
const CodeBox: FC
{transformCode(children, language)}
{language && (