diff --git a/.github/workflows/add-notebook-examples-to-docs.yml b/.github/workflows/add-notebook-examples-to-docs.yml index 78e76850..223d43d7 100644 --- a/.github/workflows/add-notebook-examples-to-docs.yml +++ b/.github/workflows/add-notebook-examples-to-docs.yml @@ -44,7 +44,7 @@ jobs: jupyter nbconvert --to markdown "$source_file" || { echo "Error: Failed to convert $source_file" >&2; continue; } markdown_file="${source_file%.ipynb}.md" echo "Removing existing content after {/* SOURCE_FILE: ... */}" - sed -i '/\{\/\* SOURCE_FILE:/,$d' "$file" + sed -i '\#{/\* SOURCE_FILE:#,$d' "$file" echo "Appending markdown to $file" echo -e "\n{/* SOURCE_FILE: $source_file */}\n" >> "$file" cat "$markdown_file" >> "$file" || { echo "Error: Failed to append markdown to $file" >&2; continue; }