summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGemini/Line.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-05-07 10:49:06 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-07 21:12:09 +0200
commitc2a8869c1fd92c52b926c7c0a76320d01262d515 (patch)
tree6f6cb73af1dcea7dd4cf993ede36f32d6e4d2d11 /Userland/Libraries/LibGemini/Line.cpp
parent24c149b013f0f76490091eda544a94ac6beb2b61 (diff)
downloadserenity-c2a8869c1fd92c52b926c7c0a76320d01262d515.zip
LibGemini: Convert StringBuilder::appendf() => AK::Format
Diffstat (limited to 'Userland/Libraries/LibGemini/Line.cpp')
-rw-r--r--Userland/Libraries/LibGemini/Line.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/Userland/Libraries/LibGemini/Line.cpp b/Userland/Libraries/LibGemini/Line.cpp
index 93a1b1d501..034b640bcd 100644
--- a/Userland/Libraries/LibGemini/Line.cpp
+++ b/Userland/Libraries/LibGemini/Line.cpp
@@ -23,12 +23,9 @@ Text::~Text()
String Heading::render_to_html() const
{
- StringBuilder builder;
- builder.appendf("<h%d>", m_level);
- builder.append(escape_html_entities(m_text.substring_view(m_level, m_text.length() - m_level)));
- builder.appendf("</h%d>", m_level);
- return builder.build();
+ return String::formatted("<h{}>{}</h{}>", m_level, escape_html_entities(m_text.substring_view(m_level, m_text.length() - m_level)), m_level);
}
+
Heading::~Heading()
{
}