quarto-dev / quarto-dev/quarto
VS Code visual mode mangles wiki-links by adding escape characters: [[original]] -> \[\[modified\]\]
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 645
- Forks
- 62
- Avg merge
- 17h 42m
- Merged PRs (30d)
- 13
Description
Background
When working with quarto documents, I will often paste from markdown files that include wiki-style links using double brackets. It is fine that quarto (pandoc) do not automatically support automatic linking, but I expect that the text will remain unchanged.
This is a problem because it modifies the document unnecessarily, adding noise to the list of changes from source control. Additionally, the escape'd version is more difficult to parse visually and thus distracts from the writing process. This behavior adds unnecessary friction and distraction to the process of copy-pasting text from Obsidian or other popular wiki-style knowledge management software.
Desired Behavior
I can work with a quarto document (qmd file) containing [[wiki-links]] in source mode in vs code with no problems at all. They are rendered nicely in the preview and are left in place in the source qmd file. This should also hold true when editing in visual mode, but it is not the case.
Reproducing the Problem
If I open the document in visual mode, the quarto extension modifies all the wiki-links text by adding escape characters before the square brackets (e.g. [[wiki-links]]). This modification also occurs every time the document is saved while the visual mode is pane is open and has focus. (Note that if the source mode pane has focus instead, the escape characters are not injected into the document).
Thanks so much for any help addressing this issue.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce this in VS Code with a Quarto .qmd file containing [[wiki-links]], then compare saving in visual mode with saving from the source-mode pane. Done means visual-mode editing and saving leave the wiki-links unchanged rather than adding escape characters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100