Skip to content

Commit

Permalink
🎶 [gh-md-toc] インデントサイズをスペース2個に変更する
Browse files Browse the repository at this point in the history
  • Loading branch information
noranuko13 committed May 9, 2023
1 parent 7e3c2de commit 2ad62bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions toc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ patterns=(

## 見出しレベルによる置換パターンの追加
pattern () {
indent="\s\s\s"
indent="\s\s"
var=$(for ((i=0; i < $1; i++)); do echo -n $indent; done)
echo "/^${var}\*\s/d"
}
Expand All @@ -46,7 +46,7 @@ patterns+=("s/\*\s/- /")

# コンソール出力
tmp=$(mktemp)
/gh-md-toc /curriculum-vitae/README.md > "$tmp"
/gh-md-toc --indent 2 /curriculum-vitae/README.md > "$tmp"
(for f in "${patterns[@]}" ; do sed -ie "$f" "$tmp"; done)
cat "$tmp"
rm "$tmp"

0 comments on commit 2ad62bf

Please sign in to comment.