似乎无法弄清楚如何替换已观看词

Previously we were using the Auto-Linkify theme component, but now unable to do that as we discontinue use of it.

So now we’re trying to work with the built-in Watched Words feature, and doing a Replace with RegEx.

We’re using Height for our tickets, which are all numbered like T-123 and then the URL just uses that T-123 behind a / to create the link.

The expression (T\-\d*) can successful capture the T-123 example, but I can’t get the $1 to be replaced by it. Ideally it would produce a link that’s like [T-123](https://xmtp.height.app/T-123). How do I go about this?

This is what I had entered into Watched Words, though I recognize that it wouldn’t actually do the same as before (auto linkify).
CleanShot 2021-10-14 at 16.25.47@2x

2 个赞

我不知道 Watched Words 是否支持正则表达式捕获和替换,只支持匹配,不支持捕获和替换。

2 个赞

明白了!是的,这真令人沮丧。我本来希望能够获得与 Auto-linkify 中相同的内置功能,因为那是在 Discourse for Teams 中唯一可用的功能。

仍然希望有一天能看到这个功能!

3 个赞