ens-normalize-python
ens-normalize-python copied to clipboard
Feature addition: ens_cure: Enhance disallowed sequence to include "ignored" characters
ignored
characters are first stripped from the input and the disallowed sequences are reported without them.
ens_process('nick.\ufe0f\ufe0f.eth').error
>>> CurableSequence(code="EMPTY_LABEL", index=4, sequence="..", suggested=".")
ens_process('01\ufe0f--345').error
>>> CurableSequence(code="HYPHEN", index=2, sequence="--", suggested="")
ens_process('01-\ufe0f-345').error
>>> CurableSequence(code="HYPHEN", index=2, sequence="--", suggested="")
ens_process('\ufe0f\'b').error
>>> CurableSequence(code="FENCED_LEADING", index=0, sequence="’", suggested="")
This affects only some CurableErrors. ens_cure
still works but uses an additional pass which first removes the ignored characters. The problem is that the reported sequence
does not match the input. I will be working on a fix.