Fixing Inline Hyperlinks by Erik Temple for 6L02

Hi all, there’s a couple of issues when trying to use the Inline Hyperlinks extension with Inform 6L02, and Erik Temple has let me know his free time is currently limited so he can’t hunt down the problem himself, so I’m hoping someone here might have a suggestion.

The extension and Eric Eve’s Text Capture (on which it depends) both compile, but, as mentioned in the “6L02 Third Party Extension Compatibility List” thread, these issues arise in play:

  1. Hyperlinks are numbered incorrectly in game.
  2. The [link]X[as]Y[end link] sequence does not behave correctly–prints Y instead of X.

As for 1. what I’ve been seeing is that no matter what hyperlink is clicked, only the command associated with the hyperlink that appears last on the screen is activated. Using the debugging command “preview hyperlink list” only shows one hyperlink in the list (as mentioned, the last one to be printed on screen), no matter how many hyperlinks are actually available.

I’m suspecting something in the I6 code of either Text Capture or Inline Hyperlinks needs to be tweaked to get the hyperlink list back on track, but I am woefully ignorant of I6. Or it might be something much simpler. Any suggestions?

This is all in Glulx, by the way.

I am equally unskilled in I6, but I’m bumping to show my interest in the update of inline hyperlinks. It’s one of two outdated extensions that have been preventing me from devoting my time to 6L02.

I’m guessing the problem with Text Capture lies in its text/indexed text handling, but I’ll need to experiment a bit.

EDIT: And the hyperlinks’ failure definitely seems to be because of the bug in Text Capture, the comparison to see whether a hyperlink is new or repeated seems to be the problem.

Thanks for looking into this, Draconis! I’m hoping the fix won’t prove too elusive.

Any luck, Draconis? My project would be quite happier with this working, so thank you for working on it.

It’s working now, I found the problem: it didn’t substitute the text variables, so all the links had the text [captured text] for both their command and their display. Now I’m just removing all my debugging code, then I’ll put it on GitHub.

EDIT: Here’s the link. I made various other small improvements as well, but the usage should be exactly the same.

Thanks for leaping to the rescue!

Works like a charm again! Thanks, Draconis!