Commented xrefs to unpublished pages break the PDF build
When building PDF from sources that Antora builds into HTML without error, the build failed with a stacktrace:
npx build-site playbook-pdf.yml --stacktrace
[17:25:11.796] FATAL (antora): Cannot read properties of undefined (reading 'url')
Cause: TypeError
at /Users/markc/Repositories/the-docs/node_modules/@antora/assembler/lib/produce-aggregate-document.js:265:45
at [Symbol.replace] (<anonymous>)
at String.replace (<anonymous>)
at aggregateAsciiDoc (/Users/markc/Repositories/the-docs/node_modules/@antora/assembler/lib/produce-aggregate-document.js:232:21)
at /Users/markc/Repositories/the-docs/node_modules/@antora/assembler/lib/produce-aggregate-document.js:425:12
at Array.forEach (<anonymous>)
at aggregateAsciiDoc (/Users/markc/Repositories/the-docs/node_modules/@antora/assembler/lib/produce-aggregate-document.js:423:11)
at /Users/markc/Repositories/the-docs/node_modules/@antora/assembler/lib/produce-aggregate-document.js:425:12
at Array.forEach (<anonymous>)
at aggregateAsciiDoc (/Users/markc/Repositories/the-docs/node_modules/@antora/assembler/lib/produce-aggregate-document.js:423:11)
It was not clear what had gone wrong. Through suggestions from Nabil Maynard and experimentation, it appears commented xrefs to unpublished pages break the PDF build.
I've set up an assembler-xrefs repo to provide a simple example that demonstrates the behavior.