diff --git a/packages/docusaurus-theme-classic/src/theme/CodeBlock/index.tsx b/packages/docusaurus-theme-classic/src/theme/CodeBlock/index.tsx index e398227db3c0..4dd1b83c4bfd 100644 --- a/packages/docusaurus-theme-classic/src/theme/CodeBlock/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/CodeBlock/index.tsx @@ -137,7 +137,7 @@ export default function CodeBlock({ const lineProps = getLineProps({line, key: i}); - if (highlightLines.includes(i + 1)) { + if (highlightLines.includes(i)) { lineProps.className += ' docusaurus-highlight-code-line'; }