Skip to content

Commit

Permalink
Update edit.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
eq19 authored Dec 6, 2023
1 parent 7da0c58 commit d3a1677
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _plugins/scripts/edit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

FILE=${1##*/}
SORT=${FILE%.*}
NUM=$(($SORT + 0))

sed -i 's/💎:/sort:/g' $1
sed -i 's/🚀:/spin:/g' $1
Expand All @@ -24,7 +25,6 @@ FRONT+="suit: ${S[$SORT]}\n"
FRONT+="---\n"
FRONT+="# $TITLE\n\n"

NUM=$(($SORT + 0))
[[ $SORT =~ ^-?[0-9]+$ && $NUM -le 9 ]] && sed -i "1s|^|$FRONT|" $1

if [[ "$SORT" == "0" || "$SORT" == "1" || "$SORT" == "9" ]]; then
Expand Down

0 comments on commit d3a1677

Please sign in to comment.