From 23807eebe9eba8a2bab868ef8ceed590359ff62b Mon Sep 17 00:00:00 2001 From: Bel LaPointe Date: Fri, 11 Feb 2022 11:19:24 -0700 Subject: [PATCH] crawl converts md images to raw link --- app/crawler/main.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/crawler/main.sh b/app/crawler/main.sh index 4504d08..c497d54 100644 --- a/app/crawler/main.sh +++ b/app/crawler/main.sh @@ -126,6 +126,10 @@ crawl_with() { | sed 's/](\([^#h]\)/]\(%%%\1/g' )" export CONTENT="${CONTENT//"%%%"/"${human_url%/*}/"}" + export CONTENT="$( + printf "%s\n" "$CONTENT" \ + | sed 's/!\[\([^]]*\)](\([^)]*\)\/-\/tree\/\([^)]*\))/![\1](\2\/-\/raw\/\3)/g' + )" export ID="$( local sum="$pid/" local title_so_far=""