obsidian-prettify icon indicating copy to clipboard operation
obsidian-prettify copied to clipboard

(table formatter) full-width characters should count for 2 chars

Open X-Wei opened this issue 3 years ago • 1 comments

CJK languages have full-width characters, but the table formatter counts a CJK (full-width) char as one char.

But in fact a CKJ char should occupy 2 chars' space if you use monospace CJK fonts (example).

Currently the advanced tables obsidian plugin treats the full-width chars pretty well, but the markdown prettifier here doesn't.

Result with advanced tables:

image

Result with markdown prettifier:

image

X-Wei avatar Mar 21 '21 16:03 X-Wei

Just to expand on this, this also happens with emojis in tables ruining the alignment

Properly aligned from advanced tables 20210414_121808

After prettifying 20210414_121820

jjspace avatar Apr 14 '21 16:04 jjspace