Skip to content

Commit

Permalink
Solve improperly nested header problem, fixes #711
Browse files Browse the repository at this point in the history
  • Loading branch information
lord committed Jun 15, 2017
1 parent 614df21 commit 685179d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/toc_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def toc_data(page_content)
header_to_nest[:children].push header if header_to_nest
true
else
header_to_nest = header if header[:level] == (header_level - 1)
header_to_nest = header if header[:level] < header_level
false
end
end
Expand Down

0 comments on commit 685179d

Please sign in to comment.