@@ -4598,13 +4598,13 @@ function toValue(val) {
45984598 return value ;
45994599}
46004600
4601- result = body . split ( '###' ) . filter ( Boolean ) . map ( line => {
4601+ result = body . trim ( ) . split ( '###' ) . filter ( Boolean ) . map ( line => {
46024602 return line . split ( / \r ? \n \r ? \n / ) . filter ( Boolean ) . map ( item => {
46034603 const line = item . trim ( ) ;
46044604 if ( line . startsWith ( '- [' ) ) {
46054605 return line . split ( / \r ? \n / ) . map ( check => {
4606- const field = check . replace ( / - \[ [ X \s ] \] / , '' ) ;
4607- return [ `${ field } ` , check . startsWith ( '- [X]' ) ]
4606+ const field = check . replace ( / - \[ [ X \s ] \] \s + / i , '' ) ;
4607+ return [ `${ field } ` , check . toUpperCase ( ) . startsWith ( '- [X] ' ) ]
46084608 } )
46094609 }
46104610
@@ -4618,8 +4618,12 @@ result = body.split('###').filter(Boolean).map(line => {
46184618 }
46194619
46204620 return [ ...prev , curr ] ;
4621- } , [ ] ) . map ( ( [ key , value ] ) => {
4622- return [ toKey ( key ) , toValue ( value ) ]
4621+ } , [ ] ) . map ( ( [ key , ...lines ] ) => {
4622+
4623+ const checkListValue = lines . find ( line => Array . isArray ( line ) ) ;
4624+ const value = checkListValue ? toValue ( checkListValue ) : toValue ( ...lines )
4625+
4626+ return [ toKey ( key ) , value ] ;
46234627} )
46244628
46254629result . forEach ( ( [ key , value ] ) => {
0 commit comments