diff --git a/packages/babel-code-frame/src/index.ts b/packages/babel-code-frame/src/index.ts index 9c237d423e..35c26501c5 100644 --- a/packages/babel-code-frame/src/index.ts +++ b/packages/babel-code-frame/src/index.ts @@ -147,7 +147,7 @@ export function codeFrameColumns( const highlightedLines = highlighted ? highlight(rawLines, opts) : rawLines; let frame = highlightedLines - .split(NEWLINE) + .split(NEWLINE, end) .slice(start, end) .map((line, index) => { const number = start + 1 + index;