nl_tokens: Locates output placeholders inside text
pl_tokens: function locateOutputPlaceholder ( text ) { var range = require ( 'range' ) ; var result = [ ] ; /** @type StringStream */ var stream = <mask> ( 'stringStream' ) . create ( text ) ; while ( ! stream . eol ( ) ) { if ( stream . peek ( ) == '\\' ) { stream . next ( ) ; } else { stream . start = stream . pos ; if ( stream . match ( outputPlaceholder , true ) ) { result . push ( range . create ( stream . start , outputPlaceholder ) ) ; continue ; } } stream . next ( ) ; } return result ; }