diff options
| author | Paul Buetow <pbuetow@mimecast.com> | 2021-05-20 17:51:07 +0100 |
|---|---|---|
| committer | Paul Buetow <git@mx.buetow.org> | 2021-05-21 05:11:05 +0100 |
| commit | 65f8a2497bad58619d0cfdc76e4a0efeb15e0306 (patch) | |
| tree | 7d48e069ea8aaf0384f63dc7f8cf5477aa7f9848 /packages/md.source.sh | |
| parent | 9f8424f2e09db260ae85db7a326fb1aea6ae1902 (diff) | |
initial macos support
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) " } |
