Fix leading spaces being collapsed in descriptions

Fixes #1954
This commit is contained in:
Samantaz Fox
2021-12-07 05:40:19 +01:00
parent 1769b0fdce
commit 6c8a5a1e7f
7 changed files with 11 additions and 16 deletions

View File

@@ -945,7 +945,7 @@ def extract_video_info(video_id : String, proxy_region : String? = nil, context_
# Description
description_html = video_secondary_renderer.try &.dig?("description", "runs")
.try &.as_a.try { |t| content_to_comment_html(t).gsub("\n", "<br/>") }
.try &.as_a.try { |t| content_to_comment_html(t) }
params["descriptionHtml"] = JSON::Any.new(description_html || "<p></p>")