Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Alas, it isn't valid if one goes beyond even reading the doco.

The underlying library that the tool uses, click (https://click.palletsprojects.com/en/stable/), turns out to include the idea that the "tweet" strings can contain ECMA-48 control sequences.

This permits not only boldface and italics, but also (on very old terminals and very modern terminal emulators) underline, strikethrough, faint, reverse video, invisible, and even 8 whole colours. (-:

Again, though, I expect that in the 9 years of the system's existence, no-one has actually used this in earnest.

In part, this is because the default mode seems to be to apply a regular expression substitution to attempt to strip out control sequences, because of course ECMA-48 and ECMA-35 are over-expressive permitting things like OSC, NEL, PM, APC, cursor motions ("layout is content"), insert/delete/erase, and code page changes.

Amusingly, the regular expression substitution is not based upon an understanding of ECMA-35 and is faulty.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: