We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c7ea30 commit 033d0baCopy full SHA for 033d0ba
svg_fmt/src/svg.rs
@@ -500,6 +500,22 @@ impl Text {
500
}
501
502
503
+pub struct Comment {
504
+ pub text: String,
505
+}
506
+
507
+pub fn comment<T: Into<String>>(text: T) -> Comment {
508
+ Comment {
509
+ text: text.into()
510
+ }
511
512
513
+impl fmt::Display for Comment {
514
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
515
+ write!(f, "<!-- {} -->", self.text)
516
517
518
519
/// `text-align:{self}`
520
#[derive(Copy, Clone, PartialEq)]
521
pub enum Align {
0 commit comments