This commit is contained in:
2026-05-28 20:22:30 -04:00
parent d48bbc0fc3
commit 30b2d03c68
17 changed files with 174 additions and 290 deletions

View File

@@ -271,11 +271,12 @@ export default function PostBodyClient(props: PostBodyClientProps) {
const headings = contentRef.querySelectorAll<HTMLElement>("h2");
let referencesSection: HTMLElement | null = null;
headings.forEach((heading) => {
for (const heading of headings) {
if (heading.textContent?.trim() === referencesHeadingText) {
referencesSection = heading;
break;
}
});
}
if (referencesSection) {
referencesSection.className = "text-2xl font-bold mb-4 text-text";
@@ -285,7 +286,7 @@ export default function PostBodyClient(props: PostBodyClientProps) {
parentDiv.classList.add("references-heading");
}
let currentElement = referencesSection.nextElementSibling;
let currentElement: Element | null = referencesSection.nextElementSibling;
while (currentElement) {
if (currentElement.tagName === "P") {