1
0
mirror of synced 2026-01-24 11:32:04 +00:00
Krystine Sherwin 1529d991fd
log_help: Refactor help content adding
Content is now added to the `ContentListing` rather than the `PrettyHelp`.
`open_*` methods return the `ContentListing` that was added instead of leaving a hanging continuation.
This allows for (e.g.) options to be added directly to optiongroups, instead of requiring that groups be closed before continuation.
This also means that all `PrettyHelp`s are a listing, with the actual log being called by the default `Pass::help()`; making the mode field redundant.
Added `PrettyHelp::log_help()` which replaces the `PrettyHelp::Mode::LOG` logic.
Added `ContentListing::back()` which just returns the last element of the underlying content vector.
Some of the content tracking was made redundant and removed, in particular `PrettyHelp::_current_listing` and `ContentListing::parent`.

Converted `ContentListing` to a class instead of a struct, adjusting constructors to match.
Added `ContentListing` constructor that accepts a `source_location`.

Update `HelpPass::dump_cmds_json()` for new log_help.
2025-07-21 10:35:18 +12:00
..
2024-11-29 12:53:29 +13:00
2024-12-18 15:09:25 +01:00
2025-04-26 18:34:21 +02:00
2025-01-24 12:38:03 +01:00
2025-03-18 13:51:09 +01:00
2025-05-12 13:18:19 +12:00
2025-05-12 12:48:01 +12:00
2025-03-19 13:43:44 +01:00
2025-07-21 10:32:09 +12:00
2024-12-03 13:15:33 +13:00
2025-07-21 10:34:54 +12:00
2025-04-08 11:58:05 +12:00
2025-01-14 12:39:15 +01:00