-
Hi. Thanks for this great project. I wanted to ask if we could get an official solution to register links with any format. Like https://github.com/LabhanshAgrawal/xterm-link-provider but... official 😅 The problem with that project is that it's not updated anymore, it uses an old Xtermjs version and it has some issues when handling line breaks & emojis (which I attempt to solve in that PR) but also incompatibilities with I ask primarily because maybe you have a more generic solution working and it'd be a matter of just exposing it. I think a lot of users will find it useful! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Isn't that basically the same as the web-links addon? Would the addon's API do for you? Edit: Regarding your index issues in your PR - the index buffer mapping got reworked in the addon, as the old code (also partially used by xterm-link-provider) contained wrong assumptions about char progression on the terminal buffer. |
Beta Was this translation helpful? Give feedback.
-
Specifically this part of the API that lets you give your own regex: xterm.js/addons/addon-web-links/typings/addon-web-links.d.ts Lines 48 to 51 in 41e8ae3 |
Beta Was this translation helpful? Give feedback.
-
Oh, cool, thanks for the help! I've used The only issue I had was that this provider assumes the regex has to be an URL. It makes sense, I guess that's why it's called web link provider, heh. But: In my use case, users are able to create custom links like file paths or even words/phrases that point to a dictionary. Removing that |
Beta Was this translation helpful? Give feedback.
Isn't that basically the same as the web-links addon? Would the addon's API do for you?
Edit: Regarding your index issues in your PR - the index buffer mapping got reworked in the addon, as the old code (also partially used by xterm-link-provider) contained wrong assumptions about char progression on the terminal buffer.