Skip to content

Commit 829ea2d

Browse files
Update Broken-links-checker-final.yml
1 parent 1f32351 commit 829ea2d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/Broken-links-checker-final.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ jobs:
3232
run: |
3333
rsync -av --exclude '.git' --exclude 'node_modules' ./ sanitized_md/
3434
for file in ${{ steps.changed-files.outputs.md_files }}; do
35-
[ -f "sanitized_md/$file" ] && sed -i '/<!--/,/-->/d' "sanitized_md/$file"
35+
if [ -f "sanitized_md/$file" ]; then
36+
sed -i -e 's/<!--.*-->//g' -e '/<!--/,/-->/d' "sanitized_md/$file"
37+
fi
3638
done
3739
3840
- name: Run Lychee on Changed Markdown Files (PR)
@@ -50,7 +52,7 @@ jobs:
5052
if: github.event_name == 'workflow_dispatch'
5153
run: |
5254
rsync -av --exclude '.git' --exclude 'node_modules' ./ sanitized_md/
53-
find sanitized_md -name "*.md" -exec sed -i '/<!--/,/-->/d' {} +
55+
find sanitized_md -name "*.md" -exec sed -i -e 's/<!--.*-->//g' -e '/<!--/,/-->/d' {} +
5456
5557
- name: Run Lychee on Entire Repo (Manual)
5658
if: github.event_name == 'workflow_dispatch'

0 commit comments

Comments
 (0)