Comments: Move link utility functions to own file + module

This commit is contained in:
Samantaz Fox
2023-05-06 20:20:27 +02:00
parent de78848039
commit df85265453
4 changed files with 82 additions and 79 deletions

View File

@@ -362,8 +362,8 @@ module Invidious::Routes::API::V1::Videos
return reddit_thread.to_json
else
content_html = Frontend::Comments.template_reddit(comments, locale)
content_html = fill_links(content_html, "https", "www.reddit.com")
content_html = replace_links(content_html)
content_html = Comments.fill_links(content_html, "https", "www.reddit.com")
content_html = Comments.replace_links(content_html)
response = {
"title" => reddit_thread.title,
"permalink" => reddit_thread.permalink,