Exemple #1
0
        public static void MarkdownWriter_WriteBold(string syntax, EmphasisStyle?boldStyle)
        {
            const string   x  = Chars;
            const string   y  = CharsEscaped;
            MarkdownWriter mw = CreateBuilderWithBoldStyle(boldStyle);

            mw.WriteBold(x);

            Assert.Equal(syntax + y + syntax, mw.ToStringAndClear());
        }
Exemple #2
0
        public static void MarkdownWriter_WriteLink_TextWithContent()
        {
            MarkdownWriter mw = CreateWriter();

            string expected = $"[**b** *i* ~~s~~ `c` {CharsSquareBracketsBacktickLessThanEscaped}](u{CharsWithoutSpacesParenthesesEscaped} \"t{CharsDoubleQuoteEscaped}\")";

            mw.WriteStartLink();
            mw.WriteBold("b");
            mw.WriteString(" ");
            mw.WriteItalic("i");
            mw.WriteString(" ");
            mw.WriteStrikethrough("s");
            mw.WriteString(" ");
            mw.WriteInlineCode("c");
            mw.WriteString(" ");
            mw.WriteString(Chars);
            mw.WriteEndLink($"u{CharsWithoutSpaces}", $"t{Chars}");

            Assert.Equal(expected, mw.ToStringAndClear());
        }