Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

${workspaceFolder} on windows has a leading slash. it must not. #897

Open
SeidChr opened this issue Aug 15, 2024 · 1 comment
Open

${workspaceFolder} on windows has a leading slash. it must not. #897

SeidChr opened this issue Aug 15, 2024 · 1 comment
Labels

Comments

@SeidChr
Copy link

SeidChr commented Aug 15, 2024

Please provide details about:

  • Pass the vscode ${workspaceFolder} to ascidoctor-vscode via settings
  • The path contains a leading slash (its a windows system and the path should start with c:/)
  • The path is passed wihtout the leading slash

on windows
use this

{
  "asciidoc.preview.asciidoctorAttributes": {
      "documentroot": "${workspaceFolder}",
  },
}

use this anywhere in an adoc file

{documentroot}

open file preview, look at the output

Version: 1.92.1 (user setup)
Commit: eaa41d57266683296de7d118f574d0c2652e1fc4
Date: 2024-08-07T20:16:39.455Z
Electron: 30.1.2
ElectronBuildId: 9870757
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.19045

Name: AsciiDoc
Id: asciidoctor.asciidoctor-vscode
Description: Provides rich language support for AsciiDoc.
Version: 3.3.1
Publisher: asciidoctor
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=asciidoctor.asciidoctor-vscode

image

Using this path in include statements will actually throw an error when trying to find documents, even when they exist. The slash breaks it.

@ggrossetie
Copy link
Member

workspaceFolder is a URI file:///c:/Users/.../20240813. As mentioned in #902 we might want to use fsPath which is the file system path instead of path which is the URI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants