2021-01-02 02:39:18 +01:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
2022-03-04 13:21:26 -07:00
|
|
|
* Copyright (c) 2022, the SerenityOS developers.
|
2021-01-02 02:39:18 +01:00
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2021-01-02 02:39:18 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <AK/OwnPtr.h>
|
|
|
|
|
#include <AK/StringView.h>
|
|
|
|
|
#include <AK/Vector.h>
|
|
|
|
|
#include <LibMarkdown/Block.h>
|
2021-09-19 11:14:18 -06:00
|
|
|
#include <LibMarkdown/LineIterator.h>
|
2021-01-02 02:39:18 +01:00
|
|
|
|
|
|
|
|
namespace Markdown {
|
|
|
|
|
|
|
|
|
|
class HorizontalRule final : public Block {
|
|
|
|
|
public:
|
2022-03-04 13:21:26 -07:00
|
|
|
HorizontalRule() = default;
|
|
|
|
|
virtual ~HorizontalRule() override = default;
|
2021-01-02 02:39:18 +01:00
|
|
|
|
2023-12-16 17:49:34 +03:30
|
|
|
virtual ByteString render_to_html(bool tight = false) const override;
|
|
|
|
|
virtual Vector<ByteString> render_lines_for_terminal(size_t view_width = 0) const override;
|
2021-09-10 21:36:29 +02:00
|
|
|
virtual RecursionDecision walk(Visitor&) const override;
|
2021-09-19 11:14:18 -06:00
|
|
|
static OwnPtr<HorizontalRule> parse(LineIterator& lines);
|
2021-01-02 02:39:18 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|