protected override void Write([NotNull] XamlRenderer renderer, [NotNull] CodeBlock obj) { renderer.EnsureLine(); renderer.Write("<Paragraph xml:space=\"preserve\""); // Apply code block styling renderer.Write(" Style=\"{StaticResource {x:Static markdig:Styles.CodeBlockStyleKey}}\""); renderer.WriteLine(">"); renderer.WriteLeafRawLines(obj, true, true); renderer.WriteLine("</Paragraph>"); }
protected override void Write(XamlRenderer renderer, CodeBlock obj) { if (renderer == null) { throw new ArgumentNullException(nameof(renderer)); } if (obj == null) { throw new ArgumentNullException(nameof(obj)); } renderer.EnsureLine(); renderer.Write("<Paragraph xml:space=\"preserve\""); // Apply code block styling renderer.Write(" Style=\"{StaticResource {x:Static markdig:Styles.CodeBlockStyleKey}}\""); renderer.WriteLine(">"); renderer.WriteLeafRawLines(obj, true, true); renderer.WriteLine("</Paragraph>"); }