src/parser/parser.js
function (tpl) {
      var ldelim = new RegExp(this.ldelim + '\\*')
      var rdelim = new RegExp('\\*' + this.rdelim)
      var newTpl = ''

      for (var openTag = tpl.match(ldelim); openTag; openTag = tpl.match(ldelim)) {
        newTpl += tpl.slice(0, openTag.index)
        tpl = tpl.slice(openTag.index + openTag[0].length)
        var closeTag = tpl.match(rdelim)
        if (!closeTag) {
          throw new Error('Unclosed ' + ldelim + '*')
        }
        tpl = tpl.slice(closeTag.index + closeTag[0].length)
      }
      return newTpl + tpl
    }
function (tpl) {
      var ldelim = new RegExp(this.ldelim + '\\*')
      var rdelim = new RegExp('\\*' + this.rdelim)
      var newTpl = ''

      for (var openTag = tpl.match(ldelim); openTag; openTag = tpl.match(ldelim)) {
        newTpl += tpl.slice(0, openTag.index)
        tpl = tpl.slice(openTag.index + openTag[0].length)
        var closeTag = tpl.match(rdelim)
        if (!closeTag) {
          throw new Error('Unclosed ' + ldelim + '*')
        }
        tpl = tpl.slice(closeTag.index + closeTag[0].length)
      }
      return newTpl + tpl
    }
function ( tpl ) { var ldelim = new RegExp ( this . ldelim + '\\*' ) var rdelim = new RegExp ( '\\*' + this . rdelim ) var newTpl = '' for ( var openTag = tpl . match ( ldelim ) ; openTag ; openTag = tpl . match ( ldelim ) ) { newTpl += tpl . slice ( 0 , openTag . index ) tpl = tpl . slice ( openTag . index + openTag [ 0 ] . length ) var closeTag = tpl . match ( rdelim ) if ( ! closeTag ) { throw new Error ( 'Unclosed ' + ldelim + '*' ) } tpl = tpl . slice ( closeTag . index + closeTag [ 0 ] . length ) } return newTpl + tpl }
Remove comments. We do not want to parse them anyway.
Remove comments . We do not want to parse them anyway .