Closed ronaldtse closed 1 year ago
Discussed with OGC Staff on 2023-11-06.
@opoudjis will ask a colleague to help out with JavaScript.
(Assuming that the ToC issue is Javascript.)
No, it's my side.
Headings in the ToC in HTML are sorting by line number of the HTML. But the <h1>
and <h2>
occasionally appear on the same line with no line break between them. Fixed by introducing h1 vs h2 as secondary sort order.
Fix is not general enough: HTML is routinely putting very short clauses on the same line.
Pretty-printing HTML and then extracting line numbers, to make the line numbers accurately reflect ordering of nodes.
Awkward solution to guarantee one-line-per-element, seems to have worked.
AGAIN it has failed in Github Actions
Clearly using node.line in Nokogiri is not reliable in Windows, even if I pretty-print the XML beforehand: there is no guarantee that tags will print in separate lines. Instead, I am going to store the ordinal locations of all headers in HTML, and sort on those.
Document: https://github.com/opengeospatial/Temporal-Abstract-Spec/pull/57