File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -293,18 +293,22 @@ for (let l in lines) {
293
293
//if (delta<0) delta = -1;
294
294
if ( Math . abs ( delta ) > 1 ) console . warn ( delta , line ) ;
295
295
let prefix = '' ;
296
+ let newSection = '<section>' ;
297
+ if ( line . includes ( 'Appendix' ) ) {
298
+ newSection = '<section class="appendix">' ;
299
+ }
296
300
297
301
// heading level delta is either 0 or is +1/-1, or we're in respec mode
298
302
/* respec insists on <section>...</section> breaks around headings */
299
303
300
304
if ( delta === 0 ) {
301
- prefix = '</section><section>' ;
305
+ prefix = '</section>' + newSection ;
302
306
}
303
307
else if ( delta > 0 ) {
304
- prefix = '<section>' . repeat ( delta ) ;
308
+ prefix = newSection . repeat ( delta ) ;
305
309
}
306
310
else {
307
- prefix = '</section>' + ( '</section>' ) . repeat ( Math . abs ( delta ) ) + '<section>' ;
311
+ prefix = '</section>' + ( '</section>' ) . repeat ( Math . abs ( delta ) ) + newSection ;
308
312
}
309
313
prevHeading = heading ;
310
314
line = prefix + md . render ( line ) ;
You can’t perform that action at this time.
0 commit comments