public Token(string raw_body, TokenType type, Tag tag) { this.RawBody = raw_body; this.Type = type; this.Tag = tag; this.Children = new List<Token>(); this.IsProcessed = false; }
public override string Process(Tag tag) { if (tag == null) return ""; string quoted_by = ""; if (tag.Attributes.ContainsKey("")) { quoted_by = tag.Attributes[""]; } StringBuilder output = new StringBuilder(); if (quoted_by.Length > 0) { output.Append("<p>" + quoted_by + " wrote:</p>"); } output.Append("<blockquote><p>" + tag.Content + "</p></blockquote>"); return output.ToString(); }
public override string Process(Tag tag) { if (tag == null) return ""; string src = tag.Content.Trim(); if (src.Length == 0) { return src; } src = HttpUtility.UrlPathEncode(src); if (this.attributes.Length > 0) { return "<img src=\"" + src + "\" " + this.attributes + ">"; } else { return "<img src=\"" + src + "\">"; } }
public override string Process(Tag tag) { return tag == null ? "" : tag.Content; }
public abstract string Process(Tag tag);