private int ParseMarkup(out Element element, out EndTag trailingEnd)
        {
            trailingEnd = null;

            Match m;

            // commentMatcher MUST be checked before directiveMatcher!
            m = commentMatcher.Match(pos);
            if (m != null)
            {
                element = new Comment(data, pos, m.Length);
                return m.Length;
            }

            // commentMatcher MUST be checked before directiveMatcher!
            m = directiveMatcher.Match(pos);
            if (m != null)
            {
                element = new MarkupDirective(data, pos, m.Length);
                return m.Length;
            }

            m = endMatcher.Match(pos);
            if (m != null)
            {
                element = new EndTag(data, pos, m.Length, m.Groups[1].Value);
                return m.Length;
            }

            m = beginMatcher.Match(pos);
            if (m != null)
            {
                return ParseBeginTag(m, out element, out trailingEnd);
            }

            element = null;
            return -1;
        }
 protected override void OnComment(Comment comment)
 {
     base.OnComment (comment);
 }
        protected override void OnComment(Comment comment)
        {

        }
 protected override void OnComment(Comment comment)
 {
     if (FlagNotSet(Flag.RemoveComments))
         base.OnComment(comment);
 }
        protected override void OnComment(Comment comment)
        {
            if (comment == null || _scriptDepth > 0)
                return;

            Emit(comment.ToString());
            base.OnComment(comment);
        }
 protected virtual void OnComment(Comment comment)
 {
     DefaultAction(comment);
 }