1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 23:48:11 +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

@ -32,6 +32,7 @@ public:
virtual Node const* parent() const override { return nullptr; }
virtual ErrorOr<String> name() const override;
String const& section_name() const { return m_section; }
virtual unsigned section_number() const override { return m_section.to_number<unsigned>().value_or(0); }
virtual ErrorOr<String> path() const override;
virtual PageNode const* document() const override { return nullptr; }