Should fix sections created with chapter of more than two digits
This commit is contained in:
parent
d768963c30
commit
df5472ab5a
|
@ -33,7 +33,7 @@ impl HelperDef for RenderToc {
|
||||||
}
|
}
|
||||||
|
|
||||||
let level = if let Some(s) = item.get("section") {
|
let level = if let Some(s) = item.get("section") {
|
||||||
s.len() / 2
|
s.matches(".").count()
|
||||||
} else {
|
} else {
|
||||||
1
|
1
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue