private MdSerializationOptions( bool isReadOnly, MdEmphasisStyle emphasisStyle = MdEmphasisStyle.Asterisk, MdThematicBreakStyle thematicBreakStyle = MdThematicBreakStyle.Underscore, MdHeadingStyle headingStyle = MdHeadingStyle.Atx, MdCodeBlockStyle codeBlockStyle = MdCodeBlockStyle.Backtick, MdBulletListStyle bulletListStyle = MdBulletListStyle.Dash, MdOrderedListStyle orderedListStyle = MdOrderedListStyle.Dot, int minimumListIndentationWidth = 2, MdTableStyle tableStyle = MdTableStyle.GFM, int maxLineLength = -1, ITextFormatter?textFormatter = null) { m_IsReadOnly = isReadOnly; m_EmphasisStyle = emphasisStyle; m_ThematicBreakStyle = thematicBreakStyle; m_HeadingStyle = headingStyle; m_CodeBlockStyle = codeBlockStyle; m_BulletListStyle = bulletListStyle; m_OrderedListStyle = orderedListStyle; m_MinimumListIndentationWidth = minimumListIndentationWidth; m_TableStyle = tableStyle; m_MaxLineLength = maxLineLength; m_TextFormatter = textFormatter ?? DefaultTextFormatter.Instance; }
public void Serializer_respects_CodeBlockStyle_serialization_option(MdCodeBlockStyle style, char codeBlockChar) { var options = new MdSerializationOptions() { CodeBlockStyle = style }; AssertToStringEquals( $"{codeBlockChar}{codeBlockChar}{codeBlockChar}\r\n" + $"Some Code\r\n" + $"{codeBlockChar}{codeBlockChar}{codeBlockChar}\r\n", new MdDocument(new MdCodeBlock("Some Code")), options ); }