\n\n[@neurowiki2026]: https://neurowiki.org (NeuroWiki Editorial Board)\n\n## Background\n\nThe study of Artificial Intelligence In Neurodegeneration Research has evolved significantly over the past decades. Research in this area has revealed important insights into the underlying mechanisms of neurodegeneration and continues to drive therapeutic development.\n\nHistorical context and key discoveries in this field have shaped our current understanding and will continue to guide future research directions.\n\n## References\n\n1. Unknown, NeuroWiki. (2026). Reference. Retrieved from NeuroWiki.## External Links (2026)";
const refs = {"neurowiki2026": {"title": "NeuroWiki. (2026). Reference. Retrieved from NeuroWiki.## External Links", "year": 2026}};
const citationOrder = [];
const citationMap = {};
// refs_json is the authoritative source for reference metadata.
// Replace [@key] markers with superscript HTML BEFORE markdown-it renders.
// Consume preceding whitespace so citations sit flush against text (Wikipedia style).
const hasRefs = refs && Object.keys(refs).length > 0;
if (hasRefs) {
raw = raw.replace(/\s*\[@([a-zA-Z0-9_]+)\]/g, function(match, key) {
if (!refs[key]) return match;
if (!(key in citationMap)) {
citationOrder.push(key);
citationMap[key] = citationOrder.length;
}
const num = citationMap[key];
const r = refs[key];
const tip = (r.authors || '') + ' (' + (r.year || '') + ')';
return ''
+ ''
+ '[' + num + ']';
});
}
const contentEl = document.getElementById('wiki-content');
contentEl.innerHTML = md.render(raw);
// --- Build References section from refs_json (authoritative source) ---
if (citationOrder.length > 0) {
// Remove any existing reference-like sections (we regenerate from refs_json)
contentEl.querySelectorAll('h2').forEach(h2 => {
const t = h2.textContent.trim().toLowerCase();
if (t === 'references' || t.startsWith('references (') || t === 'key publications'
|| t === 'additional references' || t === 'key references'
|| t === 'selected publications' || t === 'research publications') {
// Remove the heading and all content until next h1/h2
let sib = h2.nextElementSibling;
while (sib && !sib.matches('h1,h2')) {
const next = sib.nextElementSibling;
sib.remove();
sib = next;
}
h2.remove();
}
});
const refsSection = document.createElement('div');
refsSection.id = 'references-section';
const h2 = document.createElement('h2');
h2.textContent = 'References';
refsSection.appendChild(h2);
const ol = document.createElement('ol');
ol.style.cssText = 'padding-left:1.5rem;font-size:0.9rem;line-height:1.7;color:#ccc';
citationOrder.forEach((key, i) => {
const r = refs[key];
const li = document.createElement('li');
li.id = 'ref-' + (i + 1);
li.style.cssText = 'margin-bottom:0.6rem;padding-left:0.3rem';
let h = '';
if (r.authors) h += '' + r.authors + ' ';
if (r.year) h += '(' + r.year + ') ';
if (r.title) {
const t = r.title.replace(/^'|'$/g, '').replace(//g,'>');
const url = r.doi ? 'https://doi.org/' + r.doi
: r.pmid ? 'https://pubmed.ncbi.nlm.nih.gov/' + r.pmid + '/'
: r.url || '';
if (url) h += '' + t + '. ';
else h += '' + t + '. ';
}
if (r.journal) h += '' + r.journal + '';
if (!r.title && (r.doi || r.pmid)) {
const url = r.doi ? 'https://doi.org/' + r.doi : 'https://pubmed.ncbi.nlm.nih.gov/' + r.pmid + '/';
h += ' ' + (r.doi ? 'DOI' : 'PubMed') + '';
}
li.innerHTML = h;
ol.appendChild(li);
});
refsSection.appendChild(ol);
contentEl.appendChild(refsSection);
}
// --- Rich citation hover popover ---
(function() {
const popover = document.createElement('div');
popover.id = 'cite-popover';
popover.style.cssText = 'position:absolute;display:none;background:#1a1a2e;color:#e0e0e0;'
+ 'border:1px solid rgba(79,195,247,0.35);border-radius:8px;padding:0.75rem 1rem;'
+ 'font-size:0.82rem;max-width:440px;z-index:10000;pointer-events:none;'
+ 'box-shadow:0 6px 20px rgba(0,0,0,0.5);line-height:1.5;opacity:0;'
+ 'transition:opacity 0.12s ease;';
document.body.appendChild(popover);
let showTimer = null, hideTimer = null, currentKey = null;
function showPopover(a, key) {
if (key === currentKey) return;
currentKey = key;
const r = refs[key] || {};
const num = a.textContent.replace(/[\[\]]/g,'');
const url = r.pmid ? 'https://pubmed.ncbi.nlm.nih.gov/' + r.pmid + '/'
: r.doi ? 'https://doi.org/' + r.doi : '';
let html = '
[' + num + '] ';
if (r.authors) html += r.authors.split(',')[0].trim() + ' et al.';
if (r.year) html += ' (' + r.year + ')';
if (r.journal) html += ' · ' + r.journal + '';
html += '
';
if (r.title) {
const clean = r.title.replace(/^["']|["']$/g,'').replace(//g,'>');
html += '
' + clean + '
';
}
if (r.claim) {
html += '
'
+ '↳ ' + r.claim.replace(//g,'>') + '
';
}
if (r.excerpt) {
html += '
“'
+ r.excerpt.replace(//g,'>') + '”
';
}
// Show figure thumbnail if the citation references a paper figure
if (r.figure_ref || r.figure_artifact_id) {
const figLabel = r.figure_ref || 'Figure';
const figCaption = (r.figure_caption || '').replace(//g,'>');
html += '