File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,14 +31,14 @@ echo "🔧 Cleaning up HTML in descriptions..."
3131# Use cross-platform sed syntax (works on both macOS and Linux)
3232if sed --version 2>&1 | grep -q GNU; then
3333 # GNU sed (Linux)
34- sed -i ' s|<a href="\([^"]*\)" target="_blank">here< /a>|[here ](\1)|g' " $TEMP_CONVERTED "
34+ sed -i ' s|<a[^>]* href=\\ "\([^"]*\)\\"[^>]*>\([^<]*\)< /a>|[\2 ](\1)|g' " $TEMP_CONVERTED "
3535 sed -i ' s|</br>|\n|g' " $TEMP_CONVERTED "
3636 sed -i ' s|<br>|\n|g' " $TEMP_CONVERTED "
3737 sed -i ' s|<b>\([^<]*\)</b>|**\1**|g' " $TEMP_CONVERTED "
3838 sed -i ' s|<code>\([^<]*\)</code>|`\1`|g' " $TEMP_CONVERTED "
3939else
4040 # BSD sed (macOS)
41- sed -i.tmp ' s|<a href="\([^"]*\)" target="_blank">here< /a>|[here ](\1)|g' " $TEMP_CONVERTED "
41+ sed -i.tmp ' s|<a[^>]* href=\\ "\([^"]*\)\\"[^>]*>\([^<]*\)< /a>|[\2 ](\1)|g' " $TEMP_CONVERTED "
4242 sed -i.tmp ' s|</br>|\n|g' " $TEMP_CONVERTED "
4343 sed -i.tmp ' s|<br>|\n|g' " $TEMP_CONVERTED "
4444 sed -i.tmp ' s|<b>\([^<]*\)</b>|**\1**|g' " $TEMP_CONVERTED "
You can’t perform that action at this time.
0 commit comments