示例#1
0
            public Document(Storage.Document storageDocument)
                : base(null)
            {
                List <Tree.Syntax> syntaxFactoryList = new List <Tree.Syntax>();

                syntaxFactoryList.Add(new FileText());
                syntaxFactoryList.Add(new NewLine());
                syntaxFactoryList.Add(new Comment());
                syntaxFactoryList.Add(new Space());
                syntaxFactoryList.Add(new Special());
                syntaxFactoryList.Add(new Header());
                syntaxFactoryList.Add(new Bullet());
                syntaxFactoryList.Add(new Content());

                Tree.Syntax.CreateSyntaxTree(this, storageDocument.ListAll, null, syntaxFactoryList);
            }
示例#2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");


            {
                var    storageDocument = new Storage.Document();
                string text            = "# Hello  123 <!-- Comment\r\n -->";

                text = @"
            # Hello World
            This is the <!-- My comment
            # Comment
            --> paragraph
            # Hello2 
            ";

                // text = "# T<!-- # T -->itle\r\n# Title2";



                // text = "# Title\r\n# Tit<!-- # D -->le2";

                text = @"
                # Abc [Node.js](https://nodejs.org/en/) (LTS Version)
                # Title2
                * a 
                * b
                ";


                new Storage.FileText(storageDocument, text);

                var lexerDocument = new MarkdownLexer.Document(storageDocument);
                var d             = lexerDocument.List[0].List;

                var markDownDocument = new Markdown.Document(lexerDocument);
                var d2 = (Markdown.Node)markDownDocument.List[0].List[0];

                var x  = lexerDocument.TextTree;
                var x2 = markDownDocument.TextTree;
            }
        }