src/lib/syntax/block/List.js
function generateListItem(result, hasBlankLine) {

    const content = [result[3]];

    if (hasBlankLine) {
        content.unshift('\n');
    }

    return {
        type: 'ListItem',
        checked: result[2] === '[x]' ? true : (result[2] === '[ ]' ? false : undefined), // true / false / undefined
        content,
        children: []
    };

}
function generateListItem(result, hasBlankLine) {

    const content = [result[3]];

    if (hasBlankLine) {
        content.unshift('\n');
    }

    return {
        type: 'ListItem',
        checked: result[2] === '[x]' ? true : (result[2] === '[ ]' ? false : undefined), // true / false / undefined
        content,
        children: []
    };

}
function generateListItem ( result , hasBlankLine ) { const content = [ result [ 3 ] ] ; if ( hasBlankLine ) { content . unshift ( '\n' ) ; } return { type : 'ListItem' , checked : result [ 2 ] === '[x]' ? true : ( result [ 2 ] === '[ ]' ? false : undefined ) , // true / false / undefined content , children : [ ] } ; }
generate a list item node according to match result
@param result
@returns {{type: string, checked: boolean, content: [*], children: Array}}
generate a list item node according to match result