Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odd behavior when there are gaps between header levels #1

Open
willpiers opened this issue Apr 7, 2015 · 1 comment
Open

Odd behavior when there are gaps between header levels #1

willpiers opened this issue Apr 7, 2015 · 1 comment

Comments

@willpiers
Copy link

you can see an example here https://github.com/RallySoftware/burro/blob/master/UE_SHELL.md

Basically if the structure of the markdown file uses an h6 as a child of an h2 there will be extra padding generated by the padding-left that github applies to uls. I wonder if your extension could be smart enough to not add extra uls

@willklein
Copy link
Owner

Yeah, I think we can handle that. Right now the logic is simple to handle hierarchy.

What would you expect if you have, say, an h3 elsewhere? Perhaps also a child of the h2, after the h6 children:

  • h1
    • h2
      • h6
      • h3

I guess we can collapse level 6 to level 4 to maintain that distinction.

What if we have:

  • h1
    • h2
      • h6
    • h2
      • h3

... we'd probably only want to collapse levels missing from the full tree, and squash the h6 to what would be an h4.

A generic algorithm that handles unexpected hierarchies should be possible. I'll try this after I get some more browsers supported. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants