public void Serializer_respects_OrderedListStyle_serialization_option(MdOrderedListStyle style) { char listItemCharacter; switch (style) { case MdOrderedListStyle.Dot: listItemCharacter = '.'; break; case MdOrderedListStyle.Parenthesis: listItemCharacter = ')'; break; default: throw new NotImplementedException(); } var options = new MdSerializationOptions() { OrderedListStyle = style }; AssertToStringEquals( $"1{listItemCharacter} Item1\r\n" + $"2{listItemCharacter} Item2\r\n", new MdDocument( new MdOrderedList( new MdListItem("Item1"), new MdListItem("Item2") )), options ); }
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; }