/// <summary> /// Visits the section title. /// </summary> /// <param name="sectionTitle">The section title.</param> public virtual void VisitSectionTitle(SectionTitle sectionTitle) { if (sectionTitle == null) { return; } VisitAttributeList(sectionTitle.Attributes); _writer.Write("{0} ", new string('=', sectionTitle.Level)); VisitInlineContainer(sectionTitle); _writer.WriteLine(); _writer.WriteLine(); }
// TODO: based on html output, a section title should define a section block element into which all proceeding elements should be added, until the next section Title is hit public override void InternalParse(Container container, IDocumentReader reader, Func <string, bool> predicate, ref List <string> buffer, ref AttributeList attributes) { var match = PatternMatcher.SectionTitle.Match(reader.Line); if (!match.Success) { throw new ArgumentException("not a section title"); } var title = match.Groups["title"].Value; var inlineElements = ProcessInlineElements(title); var level = match.Groups["level"].Value.Length; var sectionTitle = new SectionTitle(inlineElements, level); sectionTitle.Attributes.Add(attributes); container.Add(sectionTitle); attributes = null; reader.ReadLine(); }
/// <summary> /// Visits the section title. /// </summary> /// <param name="sectionTitle">The section title.</param> public virtual void VisitSectionTitle(SectionTitle sectionTitle) { VisitInlineContainer(sectionTitle); }
public virtual void Visit(SectionTitle sectionTitle) { }
public virtual void Visit(SectionTitle sectionTitle) { Visit((InlineContainer)sectionTitle); }
protected bool Equals(SectionTitle other) { return(_level == other._level && Attributes.Equals(other.Attributes) && Elements.SequenceEqual(other.Elements)); }