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