Inconsistent rendering of bullet list at the end of file in the presence of indented links
Describe the bug
When a markdown file ends with a bullet list followed by indented link references, the last bullet list item is visually separated from the previous ones. I played a bit to pinpoint the issue, and it seems that it happens when:
- The file ends with a bullet list,
- Said bullet list is followed by link references,
- And said link references are indented.
Dedenting the link references fixes the issue. The number of lines between the last bullet point and the link references does not seem to matter.
To Reproduce
The piece of markdown with which I encountered the issue:
# Measures of disorder
This benchmark for [measures of disorder][Measures-of-disorder] is small and only intends to show the cost that these tools might incur. It is not meant to be exhaustive in any way.

It makes rather easy to see the different groups of complexities:
* *Amp(X)*, *Runs(X)* and *Mono(X)* are obvious O(n) algorithms.
* *Dis(X)* is a more involved O(n) algorithm.
* All of the other measures of disorder run in O(n log n) time.
[fixed-size-sorters]: Fixed-size-sorters.md
[insertion-sorter]: Sorters.md#insertion_sorter
[low-comparisons-sorter]: Fixed-size-sorters.md#low_comparisons_sorterExpected behavior
I expect the last bullet list item not to be visually separated from the previous ones in such a scenario.
I don't remember where the identation for link references in markdown comes from (maybe old StackOverflow questions?), but so far it has rendered as I expected on most existing platforms where I host my files (Codeberg code browsing, Codeberg Wiki, GitHub code browsing, GitHub Wiki, VSCodium markdown previous), so I expected it to work consistently with Gollum too.
Screenshots
Environment Info
Gollum 6.1.0
Running on: x86_64-linux-musl with Ruby version 3.3.9
Using:
rugged 1.9.0
gollum-rugged_adapter 3.0
gollum-lib 6.0
Markdown rendering gem: kramdown
Other rendering gems:
RedCloth 4.3.4
org-ruby 0.9.12
creole 0.5.0
asciidoctor 2.0.23
wikicloth 0.8.3I'm running Gollum through the official docker image, and displaying the results in LibreWolf on EndeavourOS.
Source: gollum/gollum