Esempio n. 1
0
        private MarkdownPage LoadPage(string directory, string id, MarkdownBundle bundle)
        {
            var file = fileProvider.GetFileInfo($"{directory}/{id}.md");

            using (var reader = file.CreateReader())
            {
                return(MarkdownPage.Load(id, bundle, reader, commonMarkSettings));
            }
        }
Esempio n. 2
0
        private MarkdownPage LoadPage(string directory, string id, MarkdownBundle bundle)
        {
            var filename = $"{directory}/{id}.md";

            try
            {
                var file = fileProvider.GetFileInfo(filename);
                using (var reader = file.CreateReader())
                {
                    return(MarkdownPage.Load(id, bundle, reader, commonMarkSettings));
                }
            }
            catch (Exception e)
            {
                throw new Exception($"Unable to parse markdown content from {filename}", e);
            }
        }