File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
crates/rust-project-goals/src Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -537,10 +537,20 @@ fn goal_plan(
537
537
plan_items,
538
538
} ) )
539
539
}
540
- _ => anyhow:: bail!(
541
- "multiple goal tables found in section `{}`" ,
542
- section. title. render( )
543
- ) ,
540
+ thats_too_many => {
541
+ let mut table_error = Vec :: new ( ) ;
542
+ for ( idx, table) in section. tables . iter ( ) . enumerate ( ) {
543
+ let header: Vec < _ > = table. header . iter ( ) . map ( |h| h. to_string ( ) ) . collect ( ) ;
544
+ table_error. push ( format ! ( "{}: {:?}" , idx + 1 , header. join( ", " ) ) ) ;
545
+ }
546
+
547
+ anyhow:: bail!(
548
+ "markdown parsing unexpectedly encountered multiple ({}) goal tables in section `{}`:\n {}" ,
549
+ thats_too_many,
550
+ section. title. render( ) ,
551
+ table_error. join( "\n " ) ,
552
+ )
553
+ }
544
554
}
545
555
}
546
556
You can’t perform that action at this time.
0 commit comments