TASVideos / tasvideos

The code for the live TASVideos website
https://tasvideos.org/
GNU General Public License v3.0
62 stars 29 forks source link

Wiki Links are not converted into text (e.g. for YouTube descriptions) #1760

Closed Masterjun3 closed 5 months ago

Masterjun3 commented 5 months ago

The recent PR #1750 fixing issue #1349 implemented movie titles for wiki links like [1234S].

This was done by not parsing it as a simple link anymore, but as a module. Which in turn has the effect that it's now more complicated to convert into text. In fact, for most modules we simply skip it when converting into text, which is the case here.

So it needs to be implemented.

It seems our way of converting modules to text is by adding the [TextModule] attribute to the module class (in this case ViewComponents/WikiLink.cs) and adding a RenderTextAsync method, which I suppose would look like public async Task<string> RenderTextAsync(IWikiPage? pageData, string href, string? displayText).

nattthebear commented 5 months ago

Seems reasonable. I forget; is the textrenderer used anywhere outside of Youtube? I'm trying to understand what all needs to be regression tested.

adelikat commented 5 months ago

It is just Youtube currently