summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibManual/PageNode.cpp
blob: 0b44ee97c0d7220bcbe8c2a4c99e4cc90083032c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * Copyright (c) 2019-2020, Sergey Bugaev <bugaevc@serenityos.org>
 * Copyright (c) 2022, the SerenityOS developers.
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#include "PageNode.h"
#include "SectionNode.h"

namespace Manual {

Node const* PageNode::parent() const
{
    return m_section.ptr();
}

NonnullRefPtrVector<Node>& PageNode::children() const
{
    static NonnullRefPtrVector<Node> empty_vector;
    return empty_vector;
}

ErrorOr<String> PageNode::path() const
{
    return TRY(String::formatted("{}/{}.md", TRY(m_section->path()), m_page));
}

}