nl_tokens: Processes the conditions within the provided template using the provided condition matcher regexp .
pl_tokens: function processCondition ( <mask> , variables , matcher ) { // eslint-disable-next-line no-constant-condition while ( true ) { let matchedCondition = template . match ( matcher ) ; if ( ! matchedCondition ) { break ; } let fragment = matchedCondition [ 0 ] ; let conditionCode = matchedCondition [ 1 ] ; let testResult = evaluateCondition ( conditionCode , variables ) ; let replaceWith = testResult ? matchedCondition [ 2 ] : matchedCondition [ 3 ] || '' ; template = template . replace ( fragment , replaceWith ) ; } return template ; }