Skip to content

Commit

Permalink
Merge pull request #27 from chengweiv5/fix-comment
Browse files Browse the repository at this point in the history
Fix comment
  • Loading branch information
ekalinin authored Oct 21, 2016
2 parents 725e400 + c44c514 commit 51e4538
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 51e4538

Please sign in to comment.