1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:08:10 +00:00

LibGemini: Convert StringBuilder::appendf() => AK::Format

This commit is contained in:
Andreas Kling 2021-05-07 10:49:06 +02:00
parent 24c149b013
commit c2a8869c1f

View file

@ -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()
{
}