File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 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) {
293293 //if (delta<0) delta = -1;
294294 if ( Math . abs ( delta ) > 1 ) console . warn ( delta , line ) ;
295295 let prefix = '' ;
296+ let newSection = '<section>' ;
297+ if ( line . includes ( 'Appendix' ) ) {
298+ newSection = '<section class="appendix">' ;
299+ }
296300
297301 // heading level delta is either 0 or is +1/-1, or we're in respec mode
298302 /* respec insists on <section>...</section> breaks around headings */
299303
300304 if ( delta === 0 ) {
301- prefix = '</section><section>' ;
305+ prefix = '</section>' + newSection ;
302306 }
303307 else if ( delta > 0 ) {
304- prefix = '<section>' . repeat ( delta ) ;
308+ prefix = newSection . repeat ( delta ) ;
305309 }
306310 else {
307- prefix = '</section>' + ( '</section>' ) . repeat ( Math . abs ( delta ) ) + '<section>' ;
311+ prefix = '</section>' + ( '</section>' ) . repeat ( Math . abs ( delta ) ) + newSection ;
308312 }
309313 prevHeading = heading ;
310314 line = prefix + md . render ( line ) ;
You can’t perform that action at this time.
0 commit comments