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));
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)); } }