process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: RMARKDOWNNOTEBOOK { ext = ['parametrize': false] } // this should be the default options, but need to work around // https://github.com/nextflow-io/nextflow/issues/2422 withName: RMARKDOWNNOTEBOOK_PARAMETRIZE { ext = ['parametrize': true] } }