src/Blocks/BlockQuote.cs
/// <summary>
/// Writes the block to the given TextWriter.
/// </summary>
/// <param name="writer">writer</param>
/// <param name="formatting">optional formatting</param>
Writes the block to the given TextWriter.
Writes the block to the given TextWriter .
public override void Write(TextWriter writer, MarkdownFormatting formatting)
        {
            string indent = Indent;
            var sb = new StringBuilder();
            foreach (var item in Children)
            {
                var sw = new StringWriter();
                item.Write(sw, formatting);
                bool isNestedQuote = item is BlockQuote;
                sb.Append(indent + (isNestedQuote ? ">" : "> "))
                    .AppendLine(sw.ToString()
                        .TrimEnd('\r', '\n')
                        .Replace("\n", "\n" + indent + "> "));
            }
            writer.Write(sb.AppendLine().ToString());
        }
public override void Write ( TextWriter writer , MarkdownFormatting formatting ) { string indent = Indent ; var sb = new StringBuilder ( ) ; foreach ( var item in Children ) { var sw = new StringWriter ( ) ; item . Write ( sw , formatting ) ; bool isNestedQuote = item is BlockQuote ; sb . Append ( indent + ( isNestedQuote ? " " : " " ) ) . AppendLine ( sw . ToString ( ) . TrimEnd ( ' \r ' , ' \n ' ) . Replace ( " \n " , " \n " + indent + " " ) ) ; } writer . Write ( sb . AppendLine ( ) . ToString ( ) ) ; }
Writes the block to the given TextWriter.
Writes the block to the given TextWriter .
writer
TextWriter
None
formatting
MarkdownFormatting
None