TASVideos / tasvideos

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

Implement text for wikiLink module #1768

Closed Masterjun3 closed 8 months ago

Masterjun3 commented 8 months ago

Resolves #1760 . (Text missing from Youtube Descriptions) Also resolves Text missing from TOC, which is a different method.

This implements InnerText of __wikiLinks being href if displaytext is empty. (For TOCs) It also implements RenderTextAsync by using the same method as InvokeAsync, but only taking the display name. (For Youtube)

NOTE: One problem remaining is that on YouTube, the wiki links won't be a link, only text. That's because I can't format it into the displaytext ( href ) format, as with links, because I don't have the writerHelper that is used to convert the href to a full url. Trying to inject it gives System.InvalidOperationException: Unable to resolve service for type 'TASVideos.WikiEngine.AST.IWriterHelper' while attempting to activate 'TASVideos.ViewComponents.WikiLink'.

However, a non-link is better than no text at all.