Esempio n. 1
0
        protected void ProcessBuffer(Container container, ref List <string> buffer, ref AttributeList attributes)
        {
            if (buffer.Count > 0)
            {
                if (attributes.ContainBlockName("quote"))
                {
                    ProcessLine <Quote>(container, ref buffer, ref attributes);
                }
                else if (attributes.ContainBlockName("pass"))
                {
                    ProcessSimple <Passthrough>(container, ref buffer, ref attributes);
                }
                else if (attributes.ContainBlockName("example"))
                {
                    ProcessLine <Example>(container, ref buffer, ref attributes);
                }
                else if (attributes.ContainBlockName("stem"))
                {
                    ProcessSimple <Stem>(container, ref buffer, ref attributes);
                }
                else if (attributes.ContainBlockName("sidebar"))
                {
                    ProcessLine <Sidebar>(container, ref buffer, ref attributes);
                }
                else if (attributes.ContainBlockName("source"))
                {
                    ProcessSimple <Source>(container, ref buffer, ref attributes);
                }
                else if (attributes.ContainBlockName("listing"))
                {
                    ProcessSimple <Listing>(container, ref buffer, ref attributes);
                }
                else if (attributes.ContainBlockName("literal"))
                {
                    ProcessSimple <Literal>(container, ref buffer, ref attributes);
                }
                else if (attributes.ContainBlockName("comment"))
                {
                    ProcessSimple <Comment>(container, ref buffer, ref attributes);
                }
                else if (attributes.ContainBlockName("verse"))
                {
                    ProcessLine <Verse>(container, ref buffer, ref attributes);
                }
                else
                {
                    ProcessParagraph(container, ref buffer, ref attributes);
                }

                buffer = new List <string>(8);
            }

            attributes = null;
        }