anchor.diff:          _currentDelimiters = token.value;
         }
         
  -      var followingWhitespace =
  -        _peek() != null && _peek().type == TokenType.whitespace ? _read() : null;
  +      var followingWhitespace = _readIf(TokenType.whitespace, eofOk: true);
   
         // Need to emit leading whitespace if the last line was not a standalone
         // line. The consecutive flag keeps track of this.
  
positive.code:     //TODO incorporate this into _readWhile()
      _checkEof();
      
      // Check to see if tag name is valid.
      if (tagType != TagType.comment) {    
        if (name == '') throw _error('Empty tag', open.start);
        
        if (name.contains('\t') || name.contains('\n') || name.contains('\r')) {
          throw _error('Tags may not contain newlines or tabs.', open.start);
        }    
        
        if (!_lenient && !_validIdentifier.hasMatch(name)) {
          throw _error('Unless in lenient mode, tags may only contain the '
              'characters a-z, A-Z, minus, underscore and period.', open.start);
        }    
      }
      
      var close = _expect(TokenType.closeDelimiter);
  
negative.code:     
        assert(_peek().type == TokenType.lineEnd || _i == 0);
    
        var precedingLineEnd = _readIf(TokenType.lineEnd, eofOk: true);
        var precedingWhitespace = _readIf(TokenType.whitespace, eofOk: true);
            
        Tag tag;
        Node tagNode;
  