compose: Use compose_state.message_content for preview rendering.

Followup to #36048. Since the trimming done by the compose_state
function is designed to not impact the actual Markdown rendering of a
message, it's safe to simplify the code path in this way.
This commit is contained in:
Evy Kassirer
2025-10-02 11:48:55 -07:00
committed by Tim Abbott
parent 3366aeb586
commit 034353b22d

View File

@@ -98,8 +98,7 @@ export function show_preview_area(): void {
export function render_preview_area(): void {
const $compose_textarea = $<HTMLTextAreaElement>("textarea#compose-textarea");
const content = $compose_textarea.val();
assert(content !== undefined);
const content = compose_state.message_content();
const $preview_message_area = $("#compose .preview_message_area");
compose_ui.render_and_show_preview(
$("#compose"),