quarto-dev / quarto-dev/quarto

drag and drop an image file into the qmd file from a mapped network drive generate a weird path

Open
#330 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
645
Forks
62
Avg merge
17h 42m
Merged PRs (30d)
13

Description

Hello,

whenever I work on a mapped drive (e.g. Z:\) I drag and drop an image file into a qmd file in source mode, it get correctly inserted with the image syntax ![Alt name](relative_path), but it messes up the relative path.

instead of this:

![alt name](img/figure1.png)

I get this:
![alt name](../../../../../z:/path_to_current_working_folder/img/figure1.png)

This seems to happen to mapped drive (in the example above I mapped a network drive \\fileserver\folder to Z:\), it does not happen if my current working directory is hosted on the main drive (C:\)

It is mildly annoying because I need to edit the path deleting the unnecessary part.

The doobley doo says it is the quarto extension handling the drag and drop:

image

If I select insert as a relative path it get changed to just the correct relative path img/figure1.png

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the drag-and-drop behavior in source mode with a qmd file and an image on a Windows mapped drive such as Z:, then inspect the Quarto extension handling mentioned in the issue. Done means the inserted path is img/figure1.png rather than a path containing ../../../../../z:/, while existing behavior on C:\ remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.