Example #1
0
        public string Render(string markdownText)
        {
            var reader   = new TokenReader(MdTokenDescriptions);
            var tokens   = reader.SplitToTokens(markdownText);
            var rootTree = new SyntaxTree(SyntaxTreeType.Text, tokens);

            AddChildTrees(rootTree);
            var converter = new TreeConverter(SyntaxTreesDescriptions, rootTree);

            return(converter.GetTaggedText());
        }
        public void SplitToTokens_ShouldReturnCorrectTokensList_IfOnlyLetters()
        {
            var text = "abc";

            var tokensList = tokenReader.SplitToTokens(text);

            var expected = new List <Token> {
                new Token(TokenType.Letters, 0, 0, "abc")
            };

            tokensList.ShouldBeEquivalentTo(expected);
        }