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

Fix SUMMARY's parse_numbered with comment #1167

Merged
merged 1 commit into from
Mar 18, 2020

Conversation

dalance
Copy link
Contributor

@dalance dalance commented Mar 17, 2020

This PR fixes #1096.

If SUMMARY contains comment like below:

- [First](./first.md)
<!-- this is a comment -->
- [Second](./second.md)

- [Second] generate Event::Start(Tag::List(..)), but items is empty because it is not nested.
The empty can be ignored.

Comment on lines +380 to +382
if items.is_empty() {
continue;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Can you add a comment here explaining why it is doing this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
I added a comment.

@dalance dalance force-pushed the fix_summary_comment branch from 6c4d0c2 to b82562f Compare March 18, 2020 03:28
Copy link
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ehuss ehuss merged commit 88684d8 into rust-lang:master Mar 18, 2020
Ruin0x11 pushed a commit to Ruin0x11/mdBook that referenced this pull request Aug 30, 2020
Fix SUMMARY's parse_numbered with comment
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

Successfully merging this pull request may close these issues.

SUMMARY.md can no longer contain HTML comments
2 participants