Beispiel #1
0
        public static EMElements ExcerptLazyParser(EMDocument doc, EMElement parent, string content, TransformationData data)
        {
            content = Preprocessor.CutoutComments(content, null);

            var elements = new EMElements(doc, new EMElementOrigin(0, content), parent);

            var previousCurrentFolder = data.CurrentFolderDetails.CurrentFolderFromMarkdownAsTopLeaf;
            var newCurrentFolder      = doc.GetAbsoluteMarkdownPath();

            data.CurrentFolderDetails.CurrentFolderFromMarkdownAsTopLeaf = newCurrentFolder;

            elements.Parse(content, data);

            data.CurrentFolderDetails.CurrentFolderFromMarkdownAsTopLeaf = previousCurrentFolder;

            return(elements);
        }