mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:17:46 +00:00
AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
This commit is contained in:
parent
f74251606d
commit
6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace Gemini {
|
||||
|
||||
String Text::render_to_html() const
|
||||
DeprecatedString Text::render_to_html() const
|
||||
{
|
||||
StringBuilder builder;
|
||||
builder.append(escape_html_entities(m_text));
|
||||
|
@ -17,12 +17,12 @@ String Text::render_to_html() const
|
|||
return builder.build();
|
||||
}
|
||||
|
||||
String Heading::render_to_html() const
|
||||
DeprecatedString Heading::render_to_html() const
|
||||
{
|
||||
return String::formatted("<h{}>{}</h{}>", m_level, escape_html_entities(m_text.substring_view(m_level, m_text.length() - m_level)), m_level);
|
||||
return DeprecatedString::formatted("<h{}>{}</h{}>", m_level, escape_html_entities(m_text.substring_view(m_level, m_text.length() - m_level)), m_level);
|
||||
}
|
||||
|
||||
String UnorderedList::render_to_html() const
|
||||
DeprecatedString UnorderedList::render_to_html() const
|
||||
{
|
||||
// 1.3.5.4.2 "Advanced clients can take the space of the bullet symbol into account"
|
||||
// FIXME: The spec is unclear about what the space means, or where it goes
|
||||
|
@ -34,7 +34,7 @@ String UnorderedList::render_to_html() const
|
|||
return builder.build();
|
||||
}
|
||||
|
||||
String Control::render_to_html() const
|
||||
DeprecatedString Control::render_to_html() const
|
||||
{
|
||||
switch (m_kind) {
|
||||
case Kind::PreformattedEnd:
|
||||
|
@ -52,7 +52,7 @@ String Control::render_to_html() const
|
|||
}
|
||||
}
|
||||
|
||||
Link::Link(String text, Document const& document)
|
||||
Link::Link(DeprecatedString text, Document const& document)
|
||||
: Line(move(text))
|
||||
{
|
||||
size_t index = 2;
|
||||
|
@ -60,7 +60,7 @@ Link::Link(String text, Document const& document)
|
|||
++index;
|
||||
auto url_string = m_text.substring_view(index, m_text.length() - index);
|
||||
auto space_offset = url_string.find_any_of(" \t"sv);
|
||||
String url = url_string;
|
||||
DeprecatedString url = url_string;
|
||||
if (space_offset.has_value()) {
|
||||
url = url_string.substring_view(0, space_offset.value());
|
||||
auto offset = space_offset.value();
|
||||
|
@ -73,7 +73,7 @@ Link::Link(String text, Document const& document)
|
|||
m_name = m_url.to_string();
|
||||
}
|
||||
|
||||
String Link::render_to_html() const
|
||||
DeprecatedString Link::render_to_html() const
|
||||
{
|
||||
StringBuilder builder;
|
||||
builder.append("<a href=\""sv);
|
||||
|
@ -84,7 +84,7 @@ String Link::render_to_html() const
|
|||
return builder.build();
|
||||
}
|
||||
|
||||
String Preformatted::render_to_html() const
|
||||
DeprecatedString Preformatted::render_to_html() const
|
||||
{
|
||||
StringBuilder builder;
|
||||
builder.append(escape_html_entities(m_text));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue