Merge pull request #2364 from expikr/patch-3
Fix dividers being folded by sections
This commit is contained in:
commit
cb0a992d8d
1 changed files with 6 additions and 6 deletions
|
|
@ -74,12 +74,6 @@ impl HelperDef for RenderToc {
|
||||||
let mut is_first_chapter = ctx.data().get("is_index").is_some();
|
let mut is_first_chapter = ctx.data().get("is_index").is_some();
|
||||||
|
|
||||||
for item in chapters {
|
for item in chapters {
|
||||||
// Spacer
|
|
||||||
if item.contains_key("spacer") {
|
|
||||||
out.write("<li class=\"spacer\"></li>")?;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
let (section, level) = if let Some(s) = item.get("section") {
|
let (section, level) = if let Some(s) = item.get("section") {
|
||||||
(s.as_str(), s.matches('.').count())
|
(s.as_str(), s.matches('.').count())
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -118,6 +112,12 @@ impl HelperDef for RenderToc {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Spacer
|
||||||
|
if item.contains_key("spacer") {
|
||||||
|
out.write("<li class=\"spacer\"></li>")?;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Part title
|
// Part title
|
||||||
if let Some(title) = item.get("part") {
|
if let Some(title) = item.get("part") {
|
||||||
out.write("<li class=\"part-title\">")?;
|
out.write("<li class=\"part-title\">")?;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue