Skip to content

Commit

Permalink
fix: line counter
Browse files Browse the repository at this point in the history
  • Loading branch information
xpadev-net committed Oct 30, 2023
1 parent 0a2865a commit 19eac8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/flashText.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ const measure = (
const widths = [];
context.font = parseFont(getValue(item.font, comment.font), comment.size);
if (item.type === "normal") {
const lines = item.content.split(/[\n\r]/);
const lines = item.content.replace(/\r\n?/g, "\n").split(/\n/);
let count = 0;
for (const value of lines) {
const measure = context.measureText(value);
Expand Down

0 comments on commit 19eac8d

Please sign in to comment.