/* * Copyright (c) 2019-2020, Sergey Bugaev * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ #include "PageNode.h" #include "SectionNode.h" #include namespace Manual { Node const* PageNode::parent() const { return m_section.ptr(); } ErrorOr>> PageNode::children() const { static Vector> empty_vector; return empty_vector.span(); } ErrorOr PageNode::path() const { return TRY(String::formatted("{}/{}.md", TRY(m_section->path()), m_page)); } ErrorOr> PageNode::help_index_page() { static NonnullRefPtr const help_index_page = TRY(try_make_ref_counted(sections[7 - 1], TRY("Help-index"_string))); return help_index_page; } }