mirror of
https://gitea.invidious.io/iv-org/invidious.git
synced 2024-08-15 00:53:41 +00:00
YT Comments: parse isPinned and strikethroughs (#3626)
This commit is contained in:
commit
feeb872791
1 changed files with 3 additions and 0 deletions
|
@ -181,6 +181,8 @@ def fetch_youtube_comments(id, cursor, format, locale, thin_mode, region, sort_b
|
|||
json.field "content", html_to_content(content_html)
|
||||
json.field "contentHtml", content_html
|
||||
|
||||
json.field "isPinned", (node_comment["pinnedCommentBadge"]?.try(&.as_bool) == true)
|
||||
|
||||
json.field "published", published.to_unix
|
||||
json.field "publishedText", translate(locale, "`x` ago", recode_date(published, locale))
|
||||
|
||||
|
@ -670,6 +672,7 @@ def content_to_comment_html(content, video_id : String? = "")
|
|||
end
|
||||
|
||||
text = "<b>#{text}</b>" if run["bold"]?
|
||||
text = "<s>#{text}</s>" if run["strikethrough"]?
|
||||
text = "<i>#{text}</i>" if run["italics"]?
|
||||
|
||||
text
|
||||
|
|
Loading…
Reference in a new issue