Coverage Report

Created: 2026-05-16 07:03

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/serenity/Userland/Libraries/LibMarkdown/CommentBlock.h
Line
Count
Source
1
/*
2
 * Copyright (c) 2021, Ben Wiederhake <BenWiederhake.GitHub@gmx.de>
3
 * Copyright (c) 2022, the SerenityOS developers.
4
 *
5
 * SPDX-License-Identifier: BSD-2-Clause
6
 */
7
8
#pragma once
9
10
#include <AK/ByteString.h>
11
#include <AK/OwnPtr.h>
12
#include <LibMarkdown/Block.h>
13
#include <LibMarkdown/LineIterator.h>
14
15
namespace Markdown {
16
17
class CommentBlock final : public Block {
18
public:
19
    CommentBlock(ByteString const& comment)
20
22.4k
        : m_comment(comment)
21
22.4k
    {
22
22.4k
    }
23
22.4k
    virtual ~CommentBlock() override = default;
24
25
    virtual ByteString render_to_html(bool tight = false) const override;
26
    virtual Vector<ByteString> render_lines_for_terminal(size_t view_width = 0) const override;
27
    virtual RecursionDecision walk(Visitor&) const override;
28
    static OwnPtr<CommentBlock> parse(LineIterator& lines);
29
30
private:
31
    ByteString m_comment;
32
};
33
34
}