File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change 54
54
classes : notes ,
55
55
options : { bake_subtitle : true } )
56
56
57
- BakeChapterTitle . v2 (
58
- chapters : book . units . chapters ,
59
- numbering_options : {
60
- mode : :unit_chapter_page ,
61
- unit_offset : -2 ,
62
- chapter_offset : -1
63
- }
64
- )
57
+ skipped_units = book . units ( "$[ #{ unnumbered_unit_marker } ]" ) . count - 1
58
+ book . units . each do | unit |
59
+ skipped_chapters = unit . search ( "$[ #{ unnumbered_chapter_marker } ]" ) . count - 1
60
+ numbering_options = { mode : :unit_chapter_page ,
61
+ unit_offset : -skipped_units ,
62
+ chapter_offset : -skipped_chapters }
63
+ BakeChapterTitle . v2 ( chapters : unit . chapters , numbering_options : numbering_options )
64
+ end
65
65
66
66
chapter_numbering_options = {
67
67
unnumbered : { mode : :chapter_page , page_offset : -1 } ,
186
186
)
187
187
end
188
188
189
- skipped_units = book . units ( "$[#{ unnumbered_unit_marker } ]" ) . count - 1
190
189
BakeToc . v1 (
191
190
book : book ,
192
191
options : {
211
210
HTML
212
211
else
213
212
unit = chapter . ancestor ( :unit )
214
- skipped_chapters = unit . chapters ( "$[#{ unnumbered_chapter_marker } ]" ) . count - 1
213
+ skipped_chapters = unit . search ( "$[#{ unnumbered_chapter_marker } ]" ) . count - 1
215
214
number = chapter . os_number ( { mode : :unit_chapter_page ,
216
215
unit_offset : -skipped_units ,
217
216
chapter_offset : -skipped_chapters } )
You can’t perform that action at this time.
0 commit comments