-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Sidebar doesn't add a space character when item is split in two lines #1218
Labels
A-Summary
Area: The summary page, organization of pages.
Comments
This seems to be an issue with pulldown-cmark, I think. At least, most of the processing seems to happen in the code below, unless the issue is with how mdbook generates if !self.no_section_label {
// Section does not necessarily exist
if let Some(section) = item.get("section") {
out.write("<strong aria-hidden=\"true\">")?;
out.write(§ion)?;
out.write("</strong> ")?;
}
}
if let Some(name) = item.get("name") {
// Render only inline code blocks
// filter all events that are not inline code blocks
let parser = Parser::new(name).filter(|event| match *event {
Event::Code(_) | Event::Html(_) | Event::Text(_) => true,
_ => false,
});
// render markdown to html
let mut markdown_parsed_name = String::with_capacity(name.len() * 3 / 2);
html::push_html(&mut markdown_parsed_name, parser);
// write to the handlebars template
out.write(&markdown_parsed_name)?;
}
if path_exists {
out.write("</a>")?;
} |
It is how |
Ruin0x11
pushed a commit
to Ruin0x11/mdBook
that referenced
this issue
Aug 30, 2020
Summary items that had their name split into two lines ended up with the last word of one line and the first word of the next line glued together, since a space wasn't added. Added test case for it. Fixes rust-lang#1218
rubenmoor
pushed a commit
to rubenmoor/mdBook
that referenced
this issue
Aug 5, 2022
Summary items that had their name split into two lines ended up with the last word of one line and the first word of the next line glued together, since a space wasn't added. Added test case for it. Fixes rust-lang#1218
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey there! We are using mdBook for the documentation for Void Linux, here: https://docs.voidlinux.org/.
If you look at the sidebar, under graphics drivers, there's a "NVIDIAOptimus" item. This item is specified in
SUMMARY.md
as:It is split in two lines due to our linting, where lines are constrained to 80 columns. The original source can be found in https://raw.githubusercontent.com/void-linux/void-docs/master/src/SUMMARY.md . GitHub formatting, when displaying this file (here), displays it correctly as "NVIDIA Optimus".
This seems to be a bug when creating the sidebar. I haven't noticed anything similar with normal files.
Thanks!
The text was updated successfully, but these errors were encountered: