Skip to content

Commit

Permalink
Limit to 3 values separated by 2 semicolons
Browse files Browse the repository at this point in the history
  • Loading branch information
1ec5 committed Jan 6, 2023
1 parent 2f96926 commit cf6c351
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/constants/label.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export function replaceExpression(
* Increasing this constant deepens recursion for replacing delimiters in the
* list, potentially affecting style loading performance.
*/
const maxValueListLength = 9;
const maxValueListLength = 3;

/**
* Returns an expression interpreting the given string as a list of tag values,
Expand Down
4 changes: 2 additions & 2 deletions test/spec/label.js
Original file line number Diff line number Diff line change
Expand Up @@ -518,14 +518,14 @@ describe("label", function () {
"、"
)
).to.be.eql(
"马岔河村、菜园村、刘灿东村后于口村王石楼村李岔河村岔河新村富康新村前鱼口村"
"马岔河村、菜园村、刘灿东村;后于口村;王石楼村;李岔河村;岔河新村;富康新村;前鱼口村"
);
expect(
evaluatedExpression(
"one;two;three;four;five;six;seven;eight;nine;ten",
", "
)
).to.be.eql("one, two, three, four, five, six, seven, eight, nine;ten");
).to.be.eql("one, two, three;four;five;six;seven;eight;nine;ten");
});
});
});

0 comments on commit cf6c351

Please sign in to comment.