1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 19:47:46 +00:00

LibManual: Allow directly obtaining any page's main section number

This has previously been incorrectly handled in a variety of
applications, e.g. subsections were not accounted for.
This commit is contained in:
kleines Filmröllchen 2023-07-02 13:25:53 +02:00 committed by Linus Groh
parent b1eacf8801
commit a9053618a8
6 changed files with 13 additions and 4 deletions

View file

@ -26,6 +26,7 @@ public:
virtual bool is_open() const { return false; }
virtual ErrorOr<String> path() const = 0;
virtual PageNode const* document() const = 0;
virtual unsigned section_number() const = 0;
// Backend for the command-line argument format that Help and man accept. Handles:
// [/path/to/documentation.md] (no second argument)