Fix entity decode ordering in md-to-docx (#1844)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Aaron Powell
2026-05-27 11:10:08 +10:00
committed by GitHub
parent d1fdc3184e
commit 2746e462c1
+3 -2
View File
@@ -93,8 +93,9 @@ const tableBorders = {
// --- Utility: decode HTML entities ---
function decodeEntities(str) {
return str
.replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">")
.replace(/&quot;/g, '"').replace(/&#39;/g, "'");
.replace(/&lt;/g, "<").replace(/&gt;/g, ">")
.replace(/&quot;/g, '"').replace(/&#39;/g, "'")
.replace(/&amp;/g, "&");
}
// --- Inline tokens to TextRun[] ---