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)); } }
private static void FormatCodeLine(StringBuilder html, string codeLine) => html.Append(HtmlFormatter.EncodeHtml(codeLine));
private static void AppendXmlAttributeValue(StringBuilder html, string value) => HtmlFormatter.AppendText(html, value, "");
private static void AppendXmlAttributeName(StringBuilder html, string name) => HtmlFormatter.AppendText(html, name, "color: #990000");
private static void AppendXmlComment(StringBuilder html, string text) => HtmlFormatter.AppendText(html, text, "color: gray");
private static void AppendXmlText(StringBuilder html, string text) => HtmlFormatter.AppendText(html, text, "");
private static void AppendXmlSymbol(StringBuilder html, string text) => HtmlFormatter.AppendText(html, text, "color: blue");