RenderClosing() публичный Метод

public RenderClosing ( StringBuilder dest ) : void
dest StringBuilder
Результат void
Пример #1
0
        internal void RenderVideo(Markdown m, StringBuilder b, string alt_text)
        {
            HtmlTag tag = new HtmlTag("video");
            tag.attributes ["controls"] = "controls";
            // encode url
            StringBuilder sb = m.GetStringBuilder();
            Utils.SmartHtmlEncodeAmpsAndAngles(sb, url);

            HtmlTag source = new HtmlTag("source");
            source.attributes["src"] = sb.ToString();
            m.OnPrepareVideoSource(source);

            // encode alt text
            if (!String.IsNullOrEmpty(alt_text))
            {
                sb.Length = 0;
                Utils.SmartHtmlEncodeAmpsAndAngles(sb, alt_text);
                tag.attributes["alt"] = sb.ToString();
            }

            // encode title
            if (!String.IsNullOrEmpty(title))
            {
                sb.Length = 0;
                Utils.SmartHtmlEncodeAmpsAndAngles(sb, title);
                tag.attributes["title"] = sb.ToString();
            }

            tag.closed = true;

            tag.RenderOpening(b);
            source.RenderOpening (b);
            tag.RenderClosing (b);
        }
Пример #2
0
 internal void RenderAudio(Markdown m, StringBuilder b, string alt_text)
 {
     HtmlTag tag = new HtmlTag("audio");
     tag.attributes ["controls"] = "controls";
     // encode url
     StringBuilder sb = m.GetStringBuilder();
     Utils.SmartHtmlEncodeAmpsAndAngles(sb, url);
     tag.attributes["src"] = sb.ToString();
     // encode alt text
     if (!String.IsNullOrEmpty(alt_text))
     {
         sb.Length = 0;
         Utils.SmartHtmlEncodeAmpsAndAngles(sb, alt_text);
         tag.attributes["alt"] = sb.ToString();
     }
     // encode title
     if (!String.IsNullOrEmpty(title))
     {
         sb.Length = 0;
         Utils.SmartHtmlEncodeAmpsAndAngles(sb, title);
         tag.attributes["title"] = sb.ToString();
     }
     tag.RenderOpening (b);
     tag.RenderClosing (b);
 }