[librsvg/rustify-rsvg-convert] rsvg-convert: reword comment to not mention the old api
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/rustify-rsvg-convert] rsvg-convert: reword comment to not mention the old api
- Date: Sun, 17 Jan 2021 11:46:38 +0000 (UTC)
commit a3f193436dee94802a3f6075230fd91bcd07266d
Author: Paolo Borelli <pborelli gnome org>
Date: Sun Jan 17 10:17:07 2021 +0100
rsvg-convert: reword comment to not mention the old api
src/bin/rsvg-convert/main.rs | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/bin/rsvg-convert/main.rs b/src/bin/rsvg-convert/main.rs
index ab6b5f64..0e5a32eb 100644
--- a/src/bin/rsvg-convert/main.rs
+++ b/src/bin/rsvg-convert/main.rs
@@ -601,12 +601,10 @@ fn parse_args() -> Result<Converter, clap::Error> {
let background_color = value_t!(matches, "background", String).and_then(parse_color_string);
+ // librsvg expects ids starting with '#', so it can lookup ids in externs like "subfile.svg#subid".
+ // For the user's convenience, we prepend '#' automatically; we only support specifying ids from
+ // the toplevel, and don't expect users to lookup things in externs.
let lookup_id = |id: String| {
- // RsvgHandle::has_sub() expects ids to have a '#' prepended to them,
- // so it can lookup ids in externs like "subfile.svg#subid". For the
- // user's convenience, we include this '#' automatically; we only
- // support specifying ids from the toplevel, and don't expect users to
- // lookup things in externs.
if id.starts_with('#') {
id
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]