Skip to content

Commit 49a422b

Browse files
committed
It's possible Im just dumb
1 parent 858ac69 commit 49a422b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/core/src/internal/data-grid/data-grid-lib.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,7 @@ function truncateString(data: string, w: number): string {
467467
if (data.includes("\n")) {
468468
// new lines are rare and split is relatively expensive compared to the search
469469
// it pays off to not do the split contantly. More accurately... it pays off not to run the regex.
470+
// what even is the point of this? So what if there is a /r at the end of a line? It wont be drawn anyway.
470471
data = data.split(/\r?\n/, 1)[0];
471472
}
472473
const max = w / 4; // no need to round, slice will just truncate this

0 commit comments

Comments
 (0)