Skip to content

Commit

Permalink
Fix comment
Browse files Browse the repository at this point in the history
Signed-off-by: Chengwei Yang <[email protected]>
  • Loading branch information
chengweiv5 committed Oct 21, 2016
1 parent 725e400 commit c44c514
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gh-md-toc
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
# 2. Discard rows where no substring 'user-content-' (github's markup):
# awk '/user-content-/ { ...
#
# 3.1 Get last number in each row like ' ... </span></a>sitemap.js</h1>'.
# It's a level of the current header (NF — number of fields):
# substr($NF, length($NF)-1, 1)
# 3.1 Get last number in each row like ' ... </span></a>sitemap.js</h1'.
# It's a level of the current header:
# substr($0, length($0), 1)
#
# 3.2 Get level from 3.1 and insert corresponding number of spaces before '*':
# sprintf("%*s", substr($NF, length($NF)-1, 1)*2, " ")
# sprintf("%*s", substr($0, length($0), 1)*2, " ")
#
# 4. Find head's text and insert it inside "* [ ... ]":
# substr($0, match($0, /a>.*<\/h/)+2, RLENGTH-5)
Expand Down

0 comments on commit c44c514

Please sign in to comment.