File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -80,11 +80,11 @@ impl<'a> Level<'a> {
80
80
/// not allowed to be passed to this function.
81
81
///
82
82
/// </div>
83
- pub fn title ( self , title : impl Into < Cow < ' a , str > > ) -> Title < ' a > {
83
+ pub fn title ( self , text : impl Into < Cow < ' a , str > > ) -> Title < ' a > {
84
84
Title {
85
85
level : self ,
86
86
id : None ,
87
- title : title . into ( ) ,
87
+ text : text . into ( ) ,
88
88
is_pre_styled : false ,
89
89
}
90
90
}
@@ -97,11 +97,11 @@ impl<'a> Level<'a> {
97
97
/// used to normalize untrusted text before it is passed to this function.
98
98
///
99
99
/// </div>
100
- pub fn pre_styled_title ( self , title : impl Into < Cow < ' a , str > > ) -> Title < ' a > {
100
+ pub fn pre_styled_title ( self , text : impl Into < Cow < ' a , str > > ) -> Title < ' a > {
101
101
Title {
102
102
level : self ,
103
103
id : None ,
104
- title : title . into ( ) ,
104
+ text : text . into ( ) ,
105
105
is_pre_styled : true ,
106
106
}
107
107
}
Original file line number Diff line number Diff line change @@ -585,9 +585,9 @@ impl Renderer {
585
585
} ) ;
586
586
587
587
let ( title_str, style) = if title. is_pre_styled {
588
- ( title. title . to_string ( ) , ElementStyle :: NoStyle )
588
+ ( title. text . to_string ( ) , ElementStyle :: NoStyle )
589
589
} else {
590
- ( normalize_whitespace ( & title. title ) , title_element_style)
590
+ ( normalize_whitespace ( & title. text ) , title_element_style)
591
591
} ;
592
592
for ( i, text) in title_str. lines ( ) . enumerate ( ) {
593
593
if i != 0 {
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ pub struct Padding;
110
110
pub struct Title < ' a > {
111
111
pub ( crate ) level : Level < ' a > ,
112
112
pub ( crate ) id : Option < Id < ' a > > ,
113
- pub ( crate ) title : Cow < ' a , str > ,
113
+ pub ( crate ) text : Cow < ' a , str > ,
114
114
pub ( crate ) is_pre_styled : bool ,
115
115
}
116
116
You can’t perform that action at this time.
0 commit comments