コード例 #1
0
ファイル: PostContentStyler.cs プロジェクト: nisimpson/awful2
        public override string HandleQuotes(HtmlNode node)
        {
            if (node.GetAttributeValue("class", "").Equals("bbc-block"))
            {
                var    quoteNode  = node.Descendants("blockquote").First();
                var    authorNode = node.Descendants("h4").FirstOrDefault();
                string author     = null;
                if (authorNode != null)
                {
                    author = authorNode.InnerText.Replace(" posted:", "");
                }

                var parser = new QuoteWebParser(author, quoteNode.FirstChild);
                return(parser.Body);
            }
            else
            {
                var body = new ForumContentParser(node.FirstChild).Body;
                return(string.Format("<br/><blockquote>{0}</blockquote><br/>", body));
            }
            //return string.Empty;
        }
コード例 #2
0
        public override string HandleQuotes(HtmlNode node)
        {
            if (node.GetAttributeValue("class", "").Equals("bbc-block"))
            {
                var quoteNode = node.Descendants("blockquote").First();
                var authorNode = node.Descendants("h4").FirstOrDefault();
                string author = null;
                if (authorNode != null)
                {
                    author = authorNode.InnerText.Replace(" posted:", "");
                }

                var parser = new QuoteWebParser(author, quoteNode.FirstChild);
                return parser.Body;
            }
            else
            {
                var body = new ForumContentParser(node.FirstChild).Body;
                return string.Format("<br/><blockquote>{0}</blockquote><br/>", body);
            }
            //return string.Empty;
        }