markdown-table icon indicating copy to clipboard operation
markdown-table copied to clipboard

Use UTF8 to check string length

Open DerayGa opened this issue 7 years ago • 0 comments

Hi, while I use this cool project to generate md table, I found a problem.
If text contains UTF8 character. string length count will have problem.

$tableBuilder
  ->headers(['UTF8','test'])
  ->rows([
    ['Hello', '123'],
    ['Unit °C', '456'],
  ]);

expect

| UTF8    | test |
|---------|------|
| Hello   | 123  |
| Unit °C | 456  |

actually

| UTF8     | test |
|----------|------|
| Hello    | 123  |
| Unit °C | 456  |

DerayGa avatar Nov 30 '18 03:11 DerayGa