Skip to content

Commit

Permalink
Merge pull request ekalinin#108 from zeitounator/fix/unary_operator_bug
Browse files Browse the repository at this point in the history
Bug when using `--insert` without `--no-backup`
  • Loading branch information
ekalinin authored Feb 1, 2021
2 parents 1716618 + 6feec24 commit d883e0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gh-md-toc
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,11 @@ gh_toc(){
sed -i "/${ts}/r ${toc_path}" "$gh_src"
fi
echo
if [ $no_backup = "yes" ]; then
if [ "${no_backup}" = "yes" ]; then
rm ${toc_path} ${gh_src}${ext}
fi
echo "!! TOC was added into: '$gh_src'"
if [ -z $no_backup ]; then
if [ -z "${no_backup}" ]; then
echo "!! Origin version of the file: '${gh_src}${ext}'"
echo "!! TOC added into a separate file: '${toc_path}'"
fi
Expand Down

0 comments on commit d883e0b

Please sign in to comment.