Optimization of string splitting (#13812)

This commit is contained in:
Alexander Zaytsev
2021-10-05 21:15:55 +03:00
committed by GitHub
parent 64f14b05fa
commit 42c9edaf6e

View File

@@ -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;