Skip to content

Commit

Permalink
fix: use tabindex 0 on code block component
Browse files Browse the repository at this point in the history
  • Loading branch information
hidde authored and Robbert committed Nov 18, 2024
1 parent b0a3cc8 commit 1c2a4ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/CodeBlockSyntaxHighlighting.tsx
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ export function CodeBlockSyntaxHighlighting({
return (
<Highlight theme={nldsPrismTheme} code={code} language={syntax || ''}>
{({ style, tokens, getLineProps, getTokenProps }) => (
<CodeBlock style={style}>
<CodeBlock tabIndex={0} style={style}>
{tokens.map((line, i) => (
<span key={i} {...getLineProps({ line })}>
{lineNumber && <span>{i + 1}</span>}

0 comments on commit 1c2a4ec

Please sign in to comment.