예제 #1
0
            public FreeCommentAdaptor(HtmlNodeFactory factory, AP.HtmlCommentNode node)
                : base(node)
            {
                if (node.ParentNode != null)
                {
                    throw new InvalidOperationException();
                }

                _factory = factory;
            }
예제 #2
0
 public PageRegion(
     HtmlCommentNode startComment,
     HtmlCommentNode endComment,
     IReadOnlyList<HtmlNode> nodes,
     IReadOnlyList<KeyValuePair<string, string>> options)
 {
     this.startComment = startComment;
     this.endComment = endComment;
     this.nodes = nodes;
     this.options = options;
 }
예제 #3
0
 internal static string GetXmlComment(HtmlCommentNode comment)
 {
     string s = comment.Comment;
     return s.Substring(4, s.Length - 7).Replace("--", " - -");
 }
예제 #4
0
 public static IHtmlComment AsComment(this AP.HtmlCommentNode node)
 {
     return(new HtmlCommentNodeAdapter(node));
 }
예제 #5
0
        internal static string GetXmlComment(HtmlCommentNode comment)
        {
            string str = comment.Comment;

            return(str.Substring(4, str.Length - 7).Replace("--", " - -"));
        }
예제 #6
0
        internal static string GetXmlComment(HtmlCommentNode comment)
        {
            string s = comment.Comment;
            Debug.Assert(s.StartsWith("<!--"));
            Debug.Assert(s.EndsWith("-->"));

            // remove starting/ending comment tags
            s = s.Substring(4, s.Length - 7);
            
            // ensure comment does not contain '--'
            s = s.Replace("--", " - -");

            // ensure ending char is not '-'
            if (s.Length > 0 && s[s.Length - 1] == '-')
                s += ' ';
            
            //
            return s;
        }
예제 #7
0
 public HtmlCommentNodeAdapter(AP.HtmlCommentNode node)
     : base(node)
 {
 }
예제 #8
0
        private static string GetXmlComment(HtmlCommentNode comment)
        {
            string s = comment.Comment;

            return(s.Substring(4, s.Length - 7).Replace("--", " - -"));
        }