Skip to content

Markdown preview support the UNC path files. - #26710

Merged
Matt Bierner (mjbvz) merged 1 commit into
microsoft:masterfrom
tomoki1207:markdown-preview-networkfiles
May 22, 2017
Merged

Matt Bierner (mjbvz) merged 1 commit into
microsoft:masterfrom
tomoki1207:markdown-preview-networkfiles

Conversation

@tomoki1207

@tomoki1207 MaruyamaTomoki (tomoki1207) commented May 16, 2017 •

Copy link
Copy Markdown
Contributor

Related to #26464.

  • VSCode Version: 1.12.2
  • OS Version: Windows 8.1 Pro

The built-in markdown extensions cannot preview the network files.
In my case, the network file path is UNC path(starts with\\).

This tiny changes affected to be able to preview even the UNC path files.

@mjbvz

Copy link
Copy Markdown
Contributor

I believe we need fsPath in this case because it normalize path on windows.

If the preview is not working for unc paths, first try debugging into provideTextDocumentContent in previewContentProvider.ts to see if the document is loading properly or not

@tomoki1207

MaruyamaTomoki (tomoki1207) commented May 16, 2017 •

Copy link
Copy Markdown
Contributor Author

Why we need the normalize path? For the markdown extensions? Or for the Uri internal behavior?

provideTextDocumentContent is not called. Because Error occurred at URI._validate in process of getMarkdownUri before it.
The Error is caused by UTC path is regarded as wrong URI. So, this error has been raised on other TextDocument events too.

@mjbvz Matt Bierner (mjbvz) added this to the May 2017 milestone May 22, 2017
@mjbvz
Matt Bierner (mjbvz) merged commit 3e65e25 into microsoft:master May 22, 2017
@mjbvz

Copy link
Copy Markdown
Contributor

Thanks MaruyamaTomoki (@tomoki1207)

We need to normalize the path for scroll synchronization. I believe this normalization already happens downstream in provideTextDocumentContent, so let's see if this change causes any regressions. It should be in the next insiders build

@detlefm

detlefm commented May 23, 2017

Copy link
Copy Markdown

Works fine on 1.13.0-insider.
Thank you.

@github-actions github-actions Bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants