<commit_before>(function registerStackProcessor() {

  widget.parser.register( 'stack', {
    prefix: '$',
    doc: {
      name: "${<i>variable</i>}"
    },
    recursive: true,
    processor: decode
  });
    
  function decode( token, context )
  {
    var sep = token.indexOf( ',' );
    if( sep > -1 )
    {
      var dbName = token.substring( 0, sep );
      var path = token.substring( sep+1 ).split( '|', 2 );
      if( path.length > 1 )
        return widget.util.get( dbName, path[0], path[1] );
      else
        return widget.util.get( dbName, path[0] );
    }
    else
    {
      context = context || (widget.util.getStack() || [])[0];
      return widget.get( context, token ) || "${" + token + "}";
    }
  }

})();<commit_msg>Fix bug not letting default values through in ${} templates<commit_after>(function registerStackProcessor() {

  widget.parser.register( 'stack', {
    prefix: '$',
    doc: {
      name: "${<i>variable</i>}"
    },
    recursive: true,
    processor: decode
  });
    
  function decode( token, context )
  {
    var sep = token.indexOf( ',' );
    var path;
    if( sep > -1 )
    {
      var dbName = token.substring( 0, sep );
      path = token.substring( sep+1 ).split( '|', 2 );
      return widget.util.get( dbName, path[0], path[1] );
    }
    else
    {
      context = context || (widget.util.getStack() || [])[0];
      path = token.split( '|', 2 );
      return widget.get( context, path[0], path[1] ) || "${" + token + "}";
    }
  }

})();
{'fraction_non_alphanumeric': 0.19079386257505004, 'fraction_numerical': 0.012675116744496331, 'mean_word_length': 2.2967032967032965, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1632881', 'n_tokens_mistral': 513, 'n_tokens_neox': 504, 'n_words': 117}