Skip to content

fix:Fix gqq incorrectly treating Markdown italic as comment (#3125)#9917

Open
ceasermikes002 wants to merge 3 commits intoVSCodeVim:masterfrom
ceasermikes002:fix-gqq-markdown-italic-3125
Open

fix:Fix gqq incorrectly treating Markdown italic as comment (#3125)#9917
ceasermikes002 wants to merge 3 commits intoVSCodeVim:masterfrom
ceasermikes002:fix-gqq-markdown-italic-3125

Conversation

@ceasermikes002
Copy link
Copy Markdown

Which issue(s) this PR fixes
The gqq command was incorrectly prepending asterisks to wrapped lines
when formatting Markdown text containing italic formatting (e.g., foo).

Root cause: The reflowParagraph method treated any line starting with
'*' as a comment marker for reStructuredText bullet points.

Fix: Added special handling to only treat '*' as a comment marker when
followed by a space, preserving bullet point behavior while fixing
Markdown formatting.

  • Modified src/actions/operator.ts to check for space after asterisk
  • Added test cases for both Markdown italic and bullet point scenarios

Fixes #3125"

@ceasermikes002
Copy link
Copy Markdown
Author

ceasermikes002 commented Jan 30, 2026

@J-Fields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect formatting with gqq in Markdown

2 participants