quarto-dev / quarto-dev/quarto

Don't insert spaces after list items markers when switching to visual mode in the VS Code extension

Open
#913 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Currently, switching to visual mode in the VS Code extension inserts three additional whitespaces after each list item marker. Take the following qmd file as an example:

# A title heading

Some text here and there

- a list
- with some
- items

If I switch to Visual Mode and then back to source mode again, the file has been modified to look like this:

# A title heading

Some text here and there

-   a list
-   with some
-   items

This seems consistent with how pandoc --to mardown, but in the quarto documentation lists are generally written with a single space following the list marker. Would it be possible to support this in the VS Code extension, either as a new default or an option depending on what is the most appropriate?

In the commonmark docs, there is a short writeup on their motivation to change away from the legacy four space rule and support a more flexible list space design that defaults to single space. This output can also be achieved with pandoc --to commonmark:

Image

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

Start in the VS Code extension's visual-mode conversion path and reproduce the issue with the qmd list example from the report. Compare the round trip with pandoc --to markdown and --to commonmark. Done means switching to visual mode and back preserves a single space after each list marker, or the chosen option is documented and tested.

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
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.