Skip to content

Commit

Permalink
Optimization of string splitting (#13812)
Browse files Browse the repository at this point in the history
  • Loading branch information
shoonia committed Oct 5, 2021
1 parent 64f14b0 commit 42c9eda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/babel-code-frame/src/index.ts
Expand Up @@ -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;
Expand Down

0 comments on commit 42c9eda

Please sign in to comment.