File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed
Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -236,11 +236,15 @@ pub(crate) fn jsdoc_body_to_html(
236236 js_doc : & JsDoc ,
237237 summary : bool ,
238238) -> Option < String > {
239- if summary && let Some ( doc) = js_doc. tags . iter ( ) . find_map ( |tag| if let JsDocTag :: Summary { doc } = tag {
240- Some ( doc)
241- } else {
242- None
243- } ) {
239+ if summary
240+ && let Some ( doc) = js_doc. tags . iter ( ) . find_map ( |tag| {
241+ if let JsDocTag :: Summary { doc } = tag {
242+ Some ( doc)
243+ } else {
244+ None
245+ }
246+ } )
247+ {
244248 markdown_to_html (
245249 ctx,
246250 doc,
Original file line number Diff line number Diff line change @@ -84,7 +84,9 @@ impl From<String> for JsDoc {
8484 let current_tag = std:: mem:: take ( & mut current_tag) ;
8585 if let Some ( current_tag) = current_tag {
8686 if current_tag_name == "description" {
87- if let Some ( caps) = JS_DOC_TAG_WITH_VALUE_RE . captures ( & current_tag) {
87+ if let Some ( caps) =
88+ JS_DOC_TAG_WITH_VALUE_RE . captures ( & current_tag)
89+ {
8890 if let Some ( m) = caps. get ( 2 ) {
8991 description_override = Some ( m. as_str ( ) . to_string ( ) ) ;
9092 }
@@ -834,10 +836,8 @@ const a = "a";
834836 } )
835837 ) ;
836838 assert_eq ! (
837- serde_json:: to_value( JsDoc :: from(
838- "@summary A brief summary" . to_string( )
839- ) )
840- . unwrap( ) ,
839+ serde_json:: to_value( JsDoc :: from( "@summary A brief summary" . to_string( ) ) )
840+ . unwrap( ) ,
841841 json!( {
842842 "tags" : [ {
843843 "kind" : "summary" ,
You can’t perform that action at this time.
0 commit comments