示例#1
0
 void IMarkupNodeVisitor.Visit(HeaderMarkupNode node)
 {
     writer.BeginTag("header");
        writer.WriteAttribute("title", node.Title);
        writer.WriteAttribute("level", node.Level.ToString());
        foreach (var child in node.Children)
        {
        child.Accept(this);
        }
        writer.EndTag();
 }
示例#2
0
 void IMarkupNodeVisitor.Visit(HeaderMarkupNode node)
 {
     if (styleManager.IsSectionable(node.Level + 1))
     {
         using (NestedContainer(HtmlTags.Div)
             .Attribute(HtmlAttributes.Class, styleManager.GetSectionClass(node.Level + 1)))
         {
             ProcessHeader(node);
         }
     }
     else
     {
         ProcessHeader(node);
     }
 }
示例#3
0
        void IMarkupNodeVisitor.Visit(HeaderMarkupNode node)
        {
            for (var i = 0; i <= node.Level; i++)
            {
                writer.Append('=');
            }

            writer.Append(node.Title);

            for (var i = 0; i <= node.Level; i++)
            {
                writer.Append('=');
            }

            writer.AppendLine();

            foreach (var child in node.Children)
            {
                child.Accept(this);
            }
        }
示例#4
0
 private void ProcessHeader(HeaderMarkupNode node)
 {
     container.AddElement(string.Format(HtmlTags.HeaderFormat, node.Level)).Add(node.Title);
     ProcessCompositeNode(node);
 }