File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -478,19 +478,18 @@ function postprocessFragments(html) {
478478 // Block fragments
479479 html = html . replace (
480480 new RegExp ( `${ fragment_start . string } ([\\s\\S]*?)${ fragment_end . string } ([\\s\\S]*?</li>)` , 'g' ) ,
481- ( fullMatch , content , trailingLi ) => {
482- let fixed = ( content + trailingLi ) . trim ( ) ;
481+ ( fullMatch , content , trailingLi ) => {
482+ let fixed = ( content + trailingLi ) . trim ( ) ;
483483
484- // Remove <p> inside <li>
485- fixed = fixed . replace (
486- / < l i > \s * \n ? \s * < p > ( [ \s \S ] * ?) < \/ p > \s * \n ? \s * < \/ l i > / gm,
487- ( _ , inner ) => `<li>${ inner . trim ( ) } </li>`
488- ) ;
489-
490- return `<div class="fragment">\n${ fixed } \n</div>\n\n` ;
491- }
492- ) ;
484+ // Remove <p> inside <li>
485+ fixed = fixed . replace (
486+ / < l i > \s * \n ? \s * < p > ( [ \s \S ] * ?) < \/ p > \s * \n ? \s * < \/ l i > / gm,
487+ ( _ , inner ) => `<li>${ inner . trim ( ) } </li>`
488+ ) ;
493489
490+ return `<div class="fragment">\n${ fixed } \n</div>\n\n` ;
491+ }
492+ ) ;
494493
495494 // Inline fragment: list item
496495 html = html . replace (
You can’t perform that action at this time.
0 commit comments