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

                _factory = factory;
            }
Exemple #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;
 }
Exemple #3
0
 internal static string GetXmlComment(HtmlCommentNode comment)
 {
     string s = comment.Comment;
     return s.Substring(4, s.Length - 7).Replace("--", " - -");
 }
Exemple #4
0
 public static IHtmlComment AsComment(this AP.HtmlCommentNode node)
 {
     return(new HtmlCommentNodeAdapter(node));
 }
Exemple #5
0
        internal static string GetXmlComment(HtmlCommentNode comment)
        {
            string str = comment.Comment;

            return(str.Substring(4, str.Length - 7).Replace("--", " - -"));
        }
Exemple #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;
        }
 public HtmlCommentNodeAdapter(AP.HtmlCommentNode node)
     : base(node)
 {
 }
        private static string GetXmlComment(HtmlCommentNode comment)
        {
            string s = comment.Comment;

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