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> {
8080 /// not allowed to be passed to this function.
8181 ///
8282 /// </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 > {
8484 Title {
8585 level : self ,
8686 id : None ,
87- title : title . into ( ) ,
87+ text : text . into ( ) ,
8888 is_pre_styled : false ,
8989 }
9090 }
@@ -97,11 +97,11 @@ impl<'a> Level<'a> {
9797 /// used to normalize untrusted text before it is passed to this function.
9898 ///
9999 /// </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 > {
101101 Title {
102102 level : self ,
103103 id : None ,
104- title : title . into ( ) ,
104+ text : text . into ( ) ,
105105 is_pre_styled : true ,
106106 }
107107 }
Original file line number Diff line number Diff line change @@ -585,9 +585,9 @@ impl Renderer {
585585 } ) ;
586586
587587 let ( title_str, style) = if title. is_pre_styled {
588- ( title. title . to_string ( ) , ElementStyle :: NoStyle )
588+ ( title. text . to_string ( ) , ElementStyle :: NoStyle )
589589 } else {
590- ( normalize_whitespace ( & title. title ) , title_element_style)
590+ ( normalize_whitespace ( & title. text ) , title_element_style)
591591 } ;
592592 for ( i, text) in title_str. lines ( ) . enumerate ( ) {
593593 if i != 0 {
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ pub struct Padding;
110110pub struct Title < ' a > {
111111 pub ( crate ) level : Level < ' a > ,
112112 pub ( crate ) id : Option < Id < ' a > > ,
113- pub ( crate ) title : Cow < ' a , str > ,
113+ pub ( crate ) text : Cow < ' a , str > ,
114114 pub ( crate ) is_pre_styled : bool ,
115115}
116116
You can’t perform that action at this time.
0 commit comments