diff options
| author | Paul Buetow <paul@buetow.org> | 2024-08-24 19:18:51 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-08-24 19:18:51 +0300 |
| commit | 3414d142ca5cad945657c2996f924db34da79c3d (patch) | |
| tree | 3adbd4417a417f352f88293c27ce1d2339502ae7 /lib/md.source.sh | |
| parent | d64661ccdf837bb66c3268cb4415c56ba033f515 (diff) | |
change toc format and fix a bug
Diffstat (limited to 'lib/md.source.sh')
| -rw-r--r-- | lib/md.source.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/md.source.sh b/lib/md.source.sh index 8478812..7e7e6c8 100644 --- a/lib/md.source.sh +++ b/lib/md.source.sh @@ -27,7 +27,7 @@ md::make_link () { md::make_toc_link () { local -r descr="$1"; shift - local -r text="${descr/ /}" + local -r text="$($SED -E 's/⇢ //g' <<< "$descr")" echo "[$descr](#$(generate::internal_link_id "$text"))" } @@ -38,7 +38,7 @@ md::fromgmi () { '=> '*) generate::make_link md "$line" ;; - '* :'*) + '* ⇢'*) echo -n '* ' md::make_toc_link "${line/\* /}" ;; |
