Exemple #1
0
        public void StaticRender(string fileName)
        {
            var source   = _files.LoadDestinationFile(Path.Combine(_files.DestinationPath, _folder, fileName));
            var renderer = new DocumentRenderer(nameof(RendererTest), _shell.Services);
            var document = MarkdownFactory.ParseToMarkdown(source);
            var actual   = renderer.RenderStaticHtml(document);

            CompareToBaseline(fileName, actual);
        }
 public static DocumentLocation Build(string fileName, IVsTextView textView, int line, int col)
 {
     string text = GetTextUpToLine(textView, line);
     MarkdownDocument markdownDocument = MarkdownFactory.ParseToMarkdown(text);
     LinkInline link = FindLinkAtPos(markdownDocument, col, line);
     var location = new DocumentLocation
     {
         _link = link,
         _fileName = fileName
     };
     location.Build();
     return location;
 }