X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=themes%2Fdefault.sh;h=23b03f25552b86ba2e6e3fc03a2c46d322e4cbba;hb=532b6743da019906f2f00575d246823c66ec35fd;hp=5e38ee4583f743c9240464022648d864bee9aeaf;hpb=35c700335c55a0819e3582a77211e3cb280f48fe;p=shellwiki diff --git a/themes/default.sh b/themes/default.sh index 5e38ee4..23b03f2 100755 --- a/themes/default.sh +++ b/themes/default.sh @@ -108,17 +108,21 @@ theme_editor(){ $(for file in "$_EXEC/pages/${page%/:$LANGUAGE/}/#attachments"/* "$_DATA/pages/${page%/:$LANGUAGE/}/#attachments"/*; do [ "$file" = "$_EXEC/pages/${page%/:$LANGUAGE/}/#attachments/${file##*/}" \ -a -f "$_DATA/pages/${page%/:$LANGUAGE/}/#attachments/${file##*/}" ] && continue + att="$(HTML "${file##*/}")" + url="$(printf %s\\n "${file##*/}" |sed 's;[\\<>];\\&;g' |HTML)" + name="$(printf %s\\n "${file##*/}" |sed 's;[]\\[];\\&;g' |HTML)" case ${file##*/} in \*) continue;; *.[pP][nN][gG]|*.[jJ][pP][gG]|*.[jJ][pP][eE][gG]|*.[gG][iI][fF]) [ "$page" != "${page%/:$LANGUAGE/}" ] && p=../ || p='' - att="$(HTML "${file##*/}")" - printf '
![](%s)
![](<%s>)
[%s](%s)
' "$att" "$att" + printf '[%s](<%s>)
' "$name" "$url" ;; esac done) @@ -138,7 +142,7 @@ theme_search(){ theme_page - <<-EOF