stkb/Rewrap

Bug: won't wrap lines that begin with `#` in Markdown files

ElectricRCAircraftGuy opened this issue · 1 comments

Using Alt + Q to hard-wrap comment lines inside Markdown files does not work.

Version info.

VSCode: Help --> About:

Version: 1.82.2
Commit: abd2f3db4bdb28f9e95536dfa84d8479f1eb312d
Date: 2023-09-14T05:51:20.981Z
Electron: 25.8.1
ElectronBuildId: 23779380
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Linux x64 6.2.0-33-generic

Rewrap: find the extension --> click the little gear icon --> click "Copy":

Name: Rewrap
Id: stkb.rewrap
Description: Hard word wrapping for comments and other text at a given column.
Version: 1.16.3
Publisher: stkb
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=stkb.rewrap

To create the problem:

Create a new file. Set the syntax highlighting to Plain Text. Copy and paste this into it:

```py
# dynamically allocate a pointer variable named `var`, dynamically wwwwwwwwwwwwwwwwwwwwwweeeallocate an integer object with a `0` in it
var = 0
```

Place your cursor on the long comment line. Press Alt + Q to hard wrap.

It works fine.

Now set the language to Markdown. Put the long comment line back how it was. Alt + Q no longer works to hard wrap it, but it should.

Update: it's not just inside code blocks in Markdown files, it's any line beginning with #. It won't hard wrap those lines in Markdown files.

Possibly related: #381