예제 #1
0
파일: token.cs 프로젝트: kmerenkov/bbdiese
 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;
 }
예제 #2
0
파일: quote.cs 프로젝트: kmerenkov/bbdiese
 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();
 }
예제 #3
0
파일: image.cs 프로젝트: kmerenkov/bbdiese
        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 + "\">";
            }
        }
예제 #4
0
 public override string Process(Tag tag)
 {
     return tag == null ? "" : tag.Content;
 }
예제 #5
0
 public abstract string Process(Tag tag);