see: https://docs.asciidoctor.org/asciidoc/latest/macros/footnote/#externalizing-a-footnote
assert_html!(
horror,
adoc! {r#"
:fn-foo: pass:c,q[footnote:foo[formatted _text_]]
Hi.{fn-foo}
"#},
html! {r##"
<div class="paragraph">
<p>Hi.<sup class="footnote" id="_footnote_foo">[<a id="_footnoteref_1" class="footnote" href="#_footnotedef_1" title="View footnote.">1</a>]</sup></p>
</div>
<div id="footnotes">
<hr>
<div class="footnote" id="_footnotedef_1">
<a href="#_footnoteref_1">1</a>. formatted <em>text</em>
</div>
</div>
"##}
);
my conversation with claude, TLDR; this is special-cased in asciidoctor, any attr def WRAPPED in a pass: get's special treatment: