diff options
-rw-r--r-- | Libraries/LibMarkdown/Text.cpp | 5 | ||||
-rw-r--r-- | Libraries/LibMarkdown/Text.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/Libraries/LibMarkdown/Text.cpp b/Libraries/LibMarkdown/Text.cpp index 6e1273b65f..6d0de5bca2 100644 --- a/Libraries/LibMarkdown/Text.cpp +++ b/Libraries/LibMarkdown/Text.cpp @@ -47,6 +47,11 @@ static String unescape(const StringView& text) return builder.build(); } +Text::Text(String&& text) +{ + m_spans.append({ move(text), Style {} }); +} + String Text::render_to_html() const { StringBuilder builder; diff --git a/Libraries/LibMarkdown/Text.h b/Libraries/LibMarkdown/Text.h index ca24a84a54..ee9c89a33f 100644 --- a/Libraries/LibMarkdown/Text.h +++ b/Libraries/LibMarkdown/Text.h @@ -49,6 +49,7 @@ public: Style style; }; + explicit Text(String&& text); Text(Text&& text) = default; Text() = default; |