diff options
Diffstat (limited to 'packages/md.source.sh')
| -rw-r--r-- | packages/md.source.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/md.source.sh b/packages/md.source.sh index 957b9cf3..ce190ddb 100644 --- a/packages/md.source.sh +++ b/packages/md.source.sh @@ -15,8 +15,12 @@ md::make_link () { local link="$1"; shift local descr="$1"; shift - $GREP -F -q '://' <<< "$link" || link=${link/.gmi/.md} - test -z "$descr" && descr="$link" + if $GREP -F -q '://' <<< "$link"; then + link=${link/.gmi/.md} + fi + if [[ -z "$descr" ]]; then + descr="$link" + fi echo "[$descr]($link) " } |
