mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:17:34 +00:00
LibWeb: Port HTMLToken::to_deprecated_string to new AK String
This commit is contained in:
parent
d00c030fce
commit
1f8d72da8e
5 changed files with 6 additions and 8 deletions
|
@ -179,7 +179,7 @@ void HTMLParser::run()
|
|||
break;
|
||||
auto& token = optional_token.value();
|
||||
|
||||
dbgln_if(HTML_PARSER_DEBUG, "[{}] {}", insertion_mode_name(), token.to_deprecated_string());
|
||||
dbgln_if(HTML_PARSER_DEBUG, "[{}] {}", insertion_mode_name(), token.to_string());
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher
|
||||
// As each token is emitted from the tokenizer, the user agent must follow the appropriate steps from the following list, known as the tree construction dispatcher:
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
namespace Web::HTML {
|
||||
|
||||
DeprecatedString HTMLToken::to_deprecated_string() const
|
||||
String HTMLToken::to_string() const
|
||||
{
|
||||
StringBuilder builder;
|
||||
|
||||
|
@ -70,7 +70,7 @@ DeprecatedString HTMLToken::to_deprecated_string() const
|
|||
builder.appendff("@{}:{}-{}:{}", m_start_position.line, m_start_position.column, m_end_position.line, m_end_position.column);
|
||||
}
|
||||
|
||||
return builder.to_deprecated_string();
|
||||
return MUST(builder.to_string());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedFlyString.h>
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/FlyString.h>
|
||||
#include <AK/Function.h>
|
||||
#include <AK/OwnPtr.h>
|
||||
|
@ -322,7 +320,7 @@ public:
|
|||
|
||||
Type type() const { return m_type; }
|
||||
|
||||
DeprecatedString to_deprecated_string() const;
|
||||
String to_string() const;
|
||||
|
||||
Position const& start_position() const { return m_start_position; }
|
||||
Position const& end_position() const { return m_end_position; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue