File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed
src/renderer/html_handlebars/helpers Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,15 @@ fn find_chapter(
6969 // "index.md" (unless there really is an index.md in SUMMARY.md).
7070 match target {
7171 Target :: Previous => return Ok ( None ) ,
72- Target :: Next => match chapters. iter ( ) . skip ( 1 ) . next ( ) {
72+ Target :: Next => match chapters
73+ . iter ( )
74+ . filter ( |chapter| {
75+ // Skip things like "spacer"
76+ chapter. contains_key ( "path" )
77+ } )
78+ . skip ( 1 )
79+ . next ( )
80+ {
7381 Some ( chapter) => return Ok ( Some ( chapter. clone ( ) ) ) ,
7482 None => return Ok ( None ) ,
7583 } ,
Original file line number Diff line number Diff line change 11# Summary
22
33[ Dummy Book] ( README.md )
4+
5+ ---
6+
47[ Introduction] ( intro.md )
58
69- [ First Chapter] ( first/index.md )
Original file line number Diff line number Diff line change @@ -306,7 +306,7 @@ fn check_first_toc_level() {
306306#[ test]
307307fn check_spacers ( ) {
308308 let doc = root_index_html ( ) . unwrap ( ) ;
309- let should_be = 1 ;
309+ let should_be = 2 ;
310310
311311 let num_spacers = doc
312312 . find ( Class ( "chapter" ) . descendant ( Name ( "li" ) . and ( Class ( "spacer" ) ) ) )
You can’t perform that action at this time.
0 commit comments