mirror of
https://github.com/neovim/neovim.git
synced 2026-07-31 12:49:11 +00:00
Problem: The list-item indentation logic in `gen_help_html.lua` tracks `opt.indent` that only decrements by one level when a list item is less indented than its sibling. Dedenting across multiple nesting levels at once produces the wrong left margin. Solution: Track the exact leading whitespace for each indent level in a `opt.indent_ws` stack: - On reset or a top-level item initialize the stack with the current item's whitespace. - When indenting deeper push the current whitespace at the new level. - When dedenting pop every level whose tracked whitespace is deeper than the current item (reaching the correct ancestor level).