Skip to content

Commit ef13c53

Browse files
committed
Fix: correct ordering of conversions.
1 parent c1b6469 commit ef13c53

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

server/src/processing.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -452,10 +452,11 @@ pub fn codechat_for_web_to_source(
452452
}
453453
// Translate the HTML document to Markdown.
454454
let converter = HtmlToMarkdownWrapped::new();
455-
let wet_html = converter
456-
.convert(&code_mirror.doc)
457-
.map_err(CodechatForWebToSourceError::HtmlToMarkdownFailed)?;
458-
return dehydrate_html(&wet_html).map_err(CodechatForWebToSourceError::ParseFailed);
455+
let dry_html =
456+
dehydrate_html(&code_mirror.doc).map_err(CodechatForWebToSourceError::ParseFailed)?;
457+
return converter
458+
.convert(&dry_html)
459+
.map_err(CodechatForWebToSourceError::HtmlToMarkdownFailed);
459460
}
460461
let code_doc_block_vec_html = code_mirror_to_code_doc_blocks(code_mirror);
461462
let code_doc_block_vec = doc_block_html_to_markdown(code_doc_block_vec_html)

0 commit comments

Comments
 (0)