I tried to add the test cases but the logic of `addEllipsis` is highly depends on the original CSS style and I cannot make it right. :(