stkb / Rewrap

Rewrap extension for VSCode and Visual Studio
https://marketplace.visualstudio.com/items/stkb.rewrap
Other
506 stars 62 forks source link

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

Open ElectricRCAircraftGuy opened 1 year ago

ElectricRCAircraftGuy commented 1 year ago

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.
ElectricRCAircraftGuy commented 1 year ago

Possibly related: #381