Last active
May 15, 2024 08:29
-
-
Save jasonmadigan/af7390f044487fe740fb18f0b6e520be to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Markdown is hard - this finds broken URL patterns. For example: | |
# this (doc)[https://example.com] | |
# where you meant: [doc](https://example.com) | |
pattern='\([^()]+\)\[[^][]+\]' | |
find . -type f -name "*.html" | while read -r file; do | |
perl -ne 'print "$ARGV: $_" if /\([^()]+\)\[[^][]+\]/' "$file" | grep -vE 'object\.get|decode' | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment