File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
documentation/analysis-reports-reference Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,11 @@ echo "generateJupyterReportReference: Generating ${markdown_file}..."
2424
2525# Loop through all Markdown files in the current directory
2626find . -type f -name " *.md" | sort | while read -r report_file; do
27- # Extract the first non-empty line that starts with '#'
28- report_file_header_line=$( grep -m 1 -e ' ^#\+.*' " ${report_file} " )
27+ # Extract the first non-empty line that starts with one or more '#', allowing leading spaces
28+ if ! report_file_header_line=$( grep -m 1 -e ' ^[[:space:]]*#\+[[:space:]]*.*' " ${report_file} " ) ; then
29+ echo " generateJupyterReportReference: Warning: No header line found in ${report_file} , skipping."
30+ continue
31+ fi
2932
3033 # Remove leading '#' characters and trim leading/trailing spaces
3134 description=$( echo " ${report_file_header_line} " | sed -E ' s/^#+\s*//' )
You can’t perform that action at this time.
0 commit comments