File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
compiler-rs/clients_schema_to_openapi/src Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -320,7 +320,7 @@ fn get_path_parameters(template: &str) -> Vec<&str> {
320
320
fn split_summary_desc ( desc : & str ) -> SplitDesc {
321
321
let segmenter = SentenceSegmenter :: new ( ) ;
322
322
323
- let desc_no_newlines = desc. replace ( '\n' , " " ) ;
323
+ let desc_no_newlines = desc. replace ( " \n \n " , ". \n " ) . replace ( '\n' , " " ) ;
324
324
325
325
let breakpoints: Vec < usize > = segmenter
326
326
. segment_str ( & desc_no_newlines)
@@ -379,6 +379,11 @@ mod tests {
379
379
summary: Some ( String :: from( "These are two totally" ) ) ,
380
380
description: Some ( String :: from( "Separate sentences!" ) )
381
381
} ) ;
382
+ assert_eq ! ( split_summary_desc( "Such a weird way to separate sentences\n \n Right?" ) ,
383
+ SplitDesc {
384
+ summary: Some ( String :: from( "Such a weird way to separate sentences" ) ) ,
385
+ description: Some ( String :: from( "Right?" ) )
386
+ } ) ;
382
387
assert_eq ! ( split_summary_desc( "" ) ,
383
388
SplitDesc {
384
389
summary: None ,
You can’t perform that action at this time.
0 commit comments