mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb: Insert commas between serialized CSS selectors
For convenience, we create a Formatter for Selector, so we can use `StringBuilder.join()`.
This commit is contained in:
parent
e5d3a9d10b
commit
d775212f19
Notes:
sideshowbarker
2024-07-18 02:18:12 +09:00
Author: https://github.com/AtkinsSJ
Commit: d775212f19
Pull-request: https://github.com/SerenityOS/serenity/pull/10484
Reviewed-by: https://github.com/linusg ✅
2 changed files with 13 additions and 2 deletions
|
@ -231,8 +231,7 @@ String serialize_a_group_of_selectors(NonnullRefPtrVector<Selector> const& selec
|
|||
{
|
||||
// To serialize a group of selectors serialize each selector in the group of selectors and then serialize a comma-separated list of these serializations.
|
||||
StringBuilder builder;
|
||||
for (auto& selector : selectors)
|
||||
builder.append(selector.serialize());
|
||||
builder.join(", ", selectors);
|
||||
return builder.to_string();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue