Sometimes things are simpler than they appear.

For my final contribution of the month, I was looking to fix a bug I had noticed in my terminal of choice: hyper. I had noticed during my use that some links were not clickable while others were. Though, this was not too big a problem as I was not often clicking links in the terminal, I did find it a bit odd.

To my surprise I was not the first to have noticed this as someone had already posted an issue regarding the problem. Upon looking into it, I noticed another user had referenced an issue in a seperate repository called xterm. It was apparent that this was a dependency of hyper, and was in fact the core terminal functionality of the project as well as others such as VS code.

Looking at the code it was easy to spot where the functionality for this was coming from. It was a javascript file that had many constant which eventually were all tied into one complex regular expression. To make things easy on myself, I ran this specific file on its own and copied the final value of the regular expression. I then pasted this into a RegEx101 which allowed me to test it in different use cases.

There it was very clear that the current regular expression simply was not considering any tlds that were under two characters. To fix this was very simple as I simply changed a singular character of the regular expression and muraculously it was fixed. I submitted my pull request and am awaiting a response from the maintainers of the project.

I expected this issue to be much more difficult and was surprised of how simple it ended up being. It is great to know however that this bug will fix issues in dozens of other projects which are using xterm as a dependency.