public override void WriteTo(MarkdownWriter writer)
        {
            if (content is string s)
            {
                writer.WriteOrderedItem(NumberingBase, s);
            }
            else
            {
                int number = NumberingBase;

                foreach (MElement element in Elements())
                {
                    writer.WriteStartOrderedItem(number);

                    if (element is MOrderedItem item)
                    {
                        item.WriteContentTo(writer);
                    }
                    else
                    {
                        writer.Write(element);
                    }

                    writer.WriteEndOrderedItem();
                    number++;
                }

                writer.WriteLine();
            }
        }
Exemple #2
0
 public override void WriteEndOrderedItem() => _writer.WriteEndOrderedItem();
Exemple #3
0
 public override void WriteTo(MarkdownWriter writer)
 {
     writer.WriteStartOrderedItem(Number);
     WriteContentTo(writer);
     writer.WriteEndOrderedItem();
 }