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

Section numbers are off by one after horizontal rules #779

Closed
fitzgen opened this issue Sep 5, 2018 · 3 comments
Closed

Section numbers are off by one after horizontal rules #779

fitzgen opened this issue Sep 5, 2018 · 3 comments

Comments

@fitzgen
Copy link
Member

fitzgen commented Sep 5, 2018

If one has this SUMMARY.md:

# Summary

- [Chapter 1](./chapter_1.md)
--------------------------------------------------------------------------------
- [Chapter 2](./chapter_2.md)
--------------------------------------------------------------------------------
- [Chapter 3](./chapter_3.md)

then one ends up with this bogus section numbering:

numbering

@fitzgen
Copy link
Member Author

fitzgen commented Sep 5, 2018

If someone could drop some pointers for me in here, I would be happy to try and whip up a fix :)

@mattico
Copy link
Contributor

mattico commented Sep 6, 2018

My first suggestion would be to see if this happens with upstream pulldown-cmark. I can't think of anywhere in mdbook itself that is likely to cause this at the moment, but hopefully I can be more helpful if it's not a bug in pulldown-cmark.

@badboy
Copy link
Member

badboy commented Sep 15, 2018

The Table of Contents is not rendered by pulldown-cmark, but by the toc helper and previously parsed in summary.rs, which is where I think an off-by-one error is hidden.

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

No branches or pull requests

3 participants