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