cristianvasquez / obsidian-prettify

A markdown prettifier for obsidian
GNU General Public License v3.0
129 stars 12 forks source link

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

Open X-Wei opened 3 years ago

X-Wei commented 3 years ago

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

jjspace commented 3 years ago

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