mirror of
https://github.com/iv-org/invidious.git
synced 2024-10-01 01:25:56 -04:00
Fix template_comments and comments with formatting
This commit is contained in:
parent
964a9e2abd
commit
c07016b45c
@ -589,7 +589,8 @@ get "/api/v1/comments/:id" do |env|
|
|||||||
end
|
end
|
||||||
|
|
||||||
content_text = item_comment["contentText"]["simpleText"]?.try &.as_s.rchop('\ufeff')
|
content_text = item_comment["contentText"]["simpleText"]?.try &.as_s.rchop('\ufeff')
|
||||||
content_text ||= item_comment["contentText"]["runs"][0]["text"].as_s.rchop('\ufeff')
|
content_text ||= item_comment["contentText"]["runs"].as_a.map { |comment| comment["text"] }
|
||||||
|
.join("").rchop('\ufeff')
|
||||||
|
|
||||||
json.field "author", item_comment["authorText"]["simpleText"]
|
json.field "author", item_comment["authorText"]["simpleText"]
|
||||||
json.field "authorThumbnails" do
|
json.field "authorThumbnails" do
|
||||||
|
@ -526,6 +526,7 @@ def template_youtube_comments(comments)
|
|||||||
onclick="load_comments(this)">View #{child["replies"]["replyCount"]} replies</a>
|
onclick="load_comments(this)">View #{child["replies"]["replyCount"]} replies</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
END_HTML
|
END_HTML
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user