Closed peter1000 closed 9 years ago
Interesting. Likely something changed in Atom. I'll see what I can do.
Okay, Atom is fine. Your input, however, is not. You've got a bunch of soft hyphens in your input, which mess up both Atom and this plugin. Zero-width unicode characters are generally a bad idea, since those are invisible. Now then, there are two options we have here. I could make table formatter sanitize input somewhat, or I could make it just ignore zero-width characters. Your call.
Thanks.
I just started using Atom a couple of weeks ago and the markdown-table-formatter even more recently. So, I'm not sure what would be best. I guess ignore zero-width characters might be the easier one for your side?
But I'm fine with whatever you think fit.
BTW: do you have any idea how to easily remove those soft hyphens in atom?
Okay, now this package ignores some more common zero-width characters for purposes of table cell width computation. Additional characters may be added to ignore list on user report (reason being, it's really hard to find them all, so I better wait until someone encounters one than spend a couple days reading through whole Unicode table)
As for removing those "in bulk", you have to know what unicode codepoint you want to remove. In your case, soft hyphen is 0x00AD
. So you take Atom's find and replace utility (ctrl+F or something like that), enable regular expression search (.*
button), and input \u00AD
into search box. You can 'replace all' with empty string to remove them.
Thanks a lot for you help. You can close issue if you think fit to do so.
For reference, here is current ignore list (zero-width spaces and soft hyphen): [\u200B-\u200D\uFEFF\u00AD]
Hi,
I really like your package :+1:
I just noticed that some tables seem to get wrong formatted.
example: test.md
After apply: atom-markdown-table-formatter
I'm not sure if that has to do with some setting of mine or just formats wrongly.
Cheers P