Exemplo n.º 1
0
 public static void AppendText(StringBuilder html, string text)
 {
     if (string.IsNullOrEmpty(text))
     {
         return;
     }
     html.Append(HtmlFormatter.EncodeHtml(text));
 }
 private static void FormatCodeLine(StringBuilder html, string codeLine) => html.Append(HtmlFormatter.EncodeHtml(codeLine));
Exemplo n.º 3
0
 public static void AppendText(StringBuilder html, string text, string style)
 {
     if (string.IsNullOrEmpty(style))
     {
         HtmlFormatter.AppendText(html, text);
     }
     else
     {
         html.AppendFormat("<span style=\"{0}\">{1}</span>", (object)style, (object)HtmlFormatter.EncodeHtml(text));
     }
 }