Ensure endnotes appear with their numbers at the end
See b_04_ch_3_Bakker, and #2 (closed), where this issue was first reported:
The inline callout is fine, but the third endnote doesn’t show its number next to the text of the note at the end of the document. This is an error in the Word doc, which comes through into the html. Clicking the inline note callout ("3") in the html takes you to the correct corresponding note, but it's not labeled "3". This is because the note is missing its <w:endnoteRef/>
in the OOXML:
<w:r>
<w:rPr><w:sz w:val="24"/><w:szCs w:val="24"/><w:vertAlign w:val="superscript"/></w:rPr><w:endnoteRef/></w:r>
<w:r>
All the other note references have this <w:endnoteRef/>
tag. This element is extracted into the html as <span class="endnoteRef">
, and that’s where the corresponding note number gets inserted.
To fix this, we could insert this <span class="endnoteRef">
into the html in the proper place (inside <div class="docx-endnote”> for every note
) even if it doesn’t exist. Since XSweet renumbers the notes, it should have a list of the notes anyway.
I'll put this on hold as a validation step that can come after 1.0.0