This commit is contained in:
Timothy Jaeryang Baek committed 2026-04-13 21:52:19 -05:00
1 parent 9a8c4da67d
commit 45e49d33e5
5 files changed
+19 -4

No files matched your search

+12 -1
View File
@@ -923,8 +923,19 @@ export const processDetails = (content) => {
attributes[attributeMatch[1]] = attributeMatch[2];
}
// New format: result in body content; Old format: result in attribute
let resultText = '';
if (attributes.result) {
content = content.replace(match, unescapeHtml(attributes.result));
resultText = unescapeHtml(attributes.result);
} else {
// Extract body content (strip <summary>...</summary>)
const bodyMatch = match.match(/<summary>[\s\S]*?<\/summary>\s*([\s\S]*?)\s*<\/details>/i);
if (bodyMatch && bodyMatch[1].trim()) {
resultText = unescapeHtml(bodyMatch[1].trim());
}
}
if (resultText) {
content = content.replace(match, resultText);
}
}
}