1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-22 16:45:08 +00:00

Browser: Use format functions instead of printf.

This commit is contained in:
asynts 2020-10-04 12:39:02 +02:00 committed by Andreas Kling
parent b23f66e151
commit 616af36d91
6 changed files with 19 additions and 18 deletions

View file

@ -91,7 +91,7 @@ ConsoleWidget::ConsoleWidget()
auto error = parser.errors()[0];
auto hint = error.source_location_hint(js_source);
if (!hint.is_empty())
output_html.append(String::format("<pre>%s</pre>", escape_html_entities(hint).characters()));
output_html.append(String::formatted("<pre>{}</pre>", escape_html_entities(hint)));
m_interpreter->vm().throw_exception<JS::SyntaxError>(m_interpreter->global_object(), error.to_string());
} else {
m_interpreter->run(m_interpreter->global_object(), *program);