mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:07:45 +00:00
LibPDF: Fix Destination formatting
This was not correctly written, and thus printed confusing output.
This commit is contained in:
parent
b406f1d5a4
commit
2485c500a3
1 changed files with 4 additions and 4 deletions
|
@ -227,16 +227,16 @@ struct Formatter<PDF::Destination> : Formatter<FormatString> {
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuilder param_builder;
|
StringBuilder param_builder;
|
||||||
TRY(Formatter<FormatString>::format(builder, "{{ type={} page="sv, type_str));
|
builder.builder().appendff("{{ type={} page="sv, type_str);
|
||||||
if (destination.page.has_value())
|
if (!destination.page.has_value())
|
||||||
TRY(builder.put_literal("{}"sv));
|
TRY(builder.put_literal("{{}}"sv));
|
||||||
else
|
else
|
||||||
TRY(builder.put_u64(destination.page.value()));
|
TRY(builder.put_u64(destination.page.value()));
|
||||||
for (auto& param : destination.parameters) {
|
for (auto& param : destination.parameters) {
|
||||||
TRY(builder.put_f64(double(param)));
|
TRY(builder.put_f64(double(param)));
|
||||||
TRY(builder.put_literal(" "sv));
|
TRY(builder.put_literal(" "sv));
|
||||||
}
|
}
|
||||||
return builder.put_literal("}}"sv);
|
return builder.put_literal(" }}"sv);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue