IDs of the note list start from 1. Link generated for each note started with index 0 i.e #Note0, #Note1 and so on.
As a result, first link ("#Note0") was invalid, subsequent links pointed at wrong note.
Now, generated links to the notes start with index 1 i.e (#Note1, #Note2 and so on.
github issue link: https://github.com/llvm/llvm-project/issues/64054
Tested generated HTML output manually for correctness.
git clang-format suggests formatting this block of code, but kept them as is since I didn't modify this part.