diff --git a/src/Yavsc/Helpers/AsciiDocHelpers.cs b/src/Yavsc/Helpers/AsciiDocHelpers.cs index 557a47c6..af312872 100644 --- a/src/Yavsc/Helpers/AsciiDocHelpers.cs +++ b/src/Yavsc/Helpers/AsciiDocHelpers.cs @@ -8,13 +8,13 @@ using System.Linq.Expressions; namespace Yavsc.Helpers { public static class AsciiDocHelpers -{ - static void ToHtml(this IElement elt, IHtmlContentBuilder contentbuilder) { - switch (elt.GetType().FullName) + static void ToHtml(this IElement elt, IHtmlContentBuilder contentbuilder) { - case "AsciiDocNet.Paragraph": - Paragraph p = (Paragraph) elt; + switch (elt.GetType().FullName) + { + case "AsciiDocNet.Paragraph": + Paragraph p = (Paragraph)elt; contentbuilder.AppendHtmlLine("
"); foreach (var pitem in p) { @@ -23,8 +23,8 @@ namespace Yavsc.Helpers contentbuilder.AppendHtmlLine("
"); break; case "AsciiDocNet.SectionTitle": - SectionTitle stitle = (SectionTitle) elt; - + SectionTitle stitle = (SectionTitle)elt; + contentbuilder.AppendHtmlLine($"");
contentbuilder.Append(source.Text);
contentbuilder.AppendHtmlLine("
");
break;
- default:
- string unsupportedType = elt.GetType().FullName;
- throw new InvalidProgramException(unsupportedType);
+ default:
+ string unsupportedType = elt.GetType().FullName;
+ throw new InvalidProgramException(unsupportedType);
+ }
}
- }
- static void ToHtml(this IInlineElement elt, IHtmlContentBuilder sb)
- {
- switch (elt.GetType().FullName)
+ static void ToHtml(this IInlineElement elt, IHtmlContentBuilder sb)
{
- case "AsciiDocNet.Link":
- Link link = (Link) elt;
- sb.AppendFormat("{1} ",link.Href, link.Text);
- break;
-
- case "AsciiDocNet.TextLiteral":
- sb.Append(elt.ToString());
- break;
-
- case "AsciiDocNet.Emphasis":
- sb.AppendHtml("");
- AsciiDocNet.Emphasis em = (Emphasis) elt;
- sb.Append(em.Text);
- sb.AppendHtml("");
- break;
-
- case "AsciiDocNet.Strong":
- sb.AppendHtml("");
- AsciiDocNet.Strong str = (Strong) elt;
- foreach (var stritem in str)
- {
- stritem.ToHtml(sb);
- }
- sb.AppendHtml("");
- break;
+ switch (elt.GetType().FullName)
+ {
+ case "AsciiDocNet.Link":
+ Link link = (Link)elt;
+ sb.AppendFormat("{1} ", link.Href, link.Text);
+ break;
- default:
- string unsupportedType = elt.GetType().FullName;
- throw new InvalidProgramException(unsupportedType);
+ case "AsciiDocNet.TextLiteral":
+ sb.Append(elt.ToString());
+ break;
+
+ case "AsciiDocNet.Emphasis":
+ sb.AppendHtml("");
+ AsciiDocNet.Emphasis em = (Emphasis)elt;
+ sb.Append(em.Text);
+ sb.AppendHtml("");
+ break;
+
+ case "AsciiDocNet.Strong":
+ sb.AppendHtml("");
+ AsciiDocNet.Strong str = (Strong)elt;
+ foreach (var stritem in str)
+ {
+ stritem.ToHtml(sb);
+ }
+ sb.AppendHtml("");
+ break;
+
+ default:
+ string unsupportedType = elt.GetType().FullName;
+ throw new InvalidProgramException(unsupportedType);
+ }
}
- }
- public static IHtmlContent ToHtml(this Document doc, int doclevel = 4)
- {
- var contentbuilder = new HtmlContentBuilder();
- if (doc.Title != null)
+ public static IHtmlContent ToHtml(this Document doc, int doclevel = 4)
{
- if (!string.IsNullOrWhiteSpace(doc.Title.Title))
+ var contentbuilder = new HtmlContentBuilder();
+ if (doc.Title != null)
{
- contentbuilder.AppendHtmlLine($"diff --git a/src/Yavsc/Views/Home/AboutAccess.cshtml b/src/Yavsc/Views/Home/AboutAccess.cshtml index 663d3cf7..a7ae8fa2 100644 --- a/src/Yavsc/Views/Home/AboutAccess.cshtml +++ b/src/Yavsc/Views/Home/AboutAccess.cshtml @@ -3,7 +3,7 @@ }