Skip to content

there's zwnj too #4

@simevo

Description

@simevo

Related to #2, there is also zero-width non-joiners (ZWNJ).

I'm in the process of packaging string-width in Debian, and as a low-cost, acceptable solution to all these problems I propose to replace the dependency on is-fullwidth-code-point with wcwidth.js. This patch does the trick:
https://anonscm.debian.org/git/pkg-javascript/node-string-width.git/tree/debian/patches/01-wcwidth.diff

We've created a minimal test suite of strings with zwj and zwnj, you can find it here:
https://anonscm.debian.org/git/pkg-javascript/node-string-width.git/tree/debian/patches/02-test_zwj_zwnj.diff
[sorry we also switched from ava to mocha since ava is not available yet in Debian ...; run them with mocha -u tdd]

As pointed out in #2, the right number of columns required to display an emoji zwj sequence is debatable, so the tests are only there to guarantee we're at least reproducible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions