mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
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:
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user