Fixed indenting in ToC when heading levels are skipped#13
Fixed indenting in ToC when heading levels are skipped#13malikashish8 wants to merge 2 commits intoallejo:masterfrom
Conversation
Fixed ToC for cases such as: # header 1 #### next header
|
So, I consider this to be expected behavior as a way to encourage people to use semantically correct headings while writing content. Is there a reason your content is skipping headers? I'm entirely open to reconsidering my stance on this if there's a valid use case for it. |
Fixed issue: \# h1 \### h3 \### h3 would become in ToC: \# \## \##
|
Hmm not quite what I meant. What I mean is, what type of content are you writing where skipping headings makes sense? Headings are typically used to denote new sections of related text. As an example, ## Installation
### Installing Manually
### Installing from the App StoreIf you're using different heading levels simply to change the size of the font, that's an issue to fix with CSS not with a different HTML tag. Using different HTML tags can pose accessibility issues. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
Thanks for your work here, @malikashish8! Since I haven't heard a compelling argument as to why headings would be placed out of order, I'm going to close this PR. I'm open to revisiting this again if there's an argument for it. Otherwise, the benefit of this being written in Liquid is that anyone can always keep/make the changes in their own copy of the snippet in their own Jekyll site. |
Fixed ToC for cases such as:
# header 1
#### next header