While working on a shell script, I discovered that Rewrap doesn't behave the way I expected — when I use ### to start a comment instead of just # (I'm using the former as kind of a makeshift "doc comment"), triggering a rewrap simply does nothing at all. A quick test in JavaScript shows a different, but equally undesirable, behavior. The following examples were created by setting the editor mode to the referenced language, typing the unwrapped text, and then triggering the "Rewrap/Unwrap Text At Column…" command, with width 40, on each line.
Shell script
Unusual comment markers cause the entire line to be ignored.
**Before**
```sh
# This is a long comment which will get wrapped.
## This is another long comment, but it will NOT get wrapped!
### This is another long comment which won't get wrapped.
```
**After**
```sh
# This is a long comment which will get
# wrapped.
## This is another long comment, but it will NOT get wrapped!
### This is another long comment which won't get wrapped.
```
JavaScript
Unusual comment markers are wrapped, but in an undesirable manner — in this example, the four-slash comment both has its comment marker truncated on wrapped lines and also omits the space after the comment marker. (Presumably, the entire line is interpreted as "a three-slash comment without a space after the comment marker", from which point of view the exhibited behavior is perfectly consistent.)
**Before**
```javascript
// This is a long comment which will get wrapped correctly.
/// This is another long comment which will also get wrapped correctly.
//// But this is a long comment which will NOT get wrapped correctly!
```
**After**
```javascript
// This is a long comment which will get
// wrapped correctly.
/// This is another long comment which
/// will also get wrapped correctly.
//// But this is a long comment which
///will NOT get wrapped correctly!
```
While working on a shell script, I discovered that Rewrap doesn't behave the way I expected — when I use
###
to start a comment instead of just#
(I'm using the former as kind of a makeshift "doc comment"), triggering a rewrap simply does nothing at all. A quick test in JavaScript shows a different, but equally undesirable, behavior. The following examples were created by setting the editor mode to the referenced language, typing the unwrapped text, and then triggering the "Rewrap/Unwrap Text At Column…" command, with width 40, on each line.Shell script
Unusual comment markers cause the entire line to be ignored. **Before** ```sh # This is a long comment which will get wrapped. ## This is another long comment, but it will NOT get wrapped! ### This is another long comment which won't get wrapped. ``` **After** ```sh # This is a long comment which will get # wrapped. ## This is another long comment, but it will NOT get wrapped! ### This is another long comment which won't get wrapped. ```JavaScript
Unusual comment markers are wrapped, but in an undesirable manner — in this example, the four-slash comment both has its comment marker truncated on wrapped lines and also omits the space after the comment marker. (Presumably, the entire line is interpreted as "a three-slash comment without a space after the comment marker", from which point of view the exhibited behavior is perfectly consistent.) **Before** ```javascript // This is a long comment which will get wrapped correctly. /// This is another long comment which will also get wrapped correctly. //// But this is a long comment which will NOT get wrapped correctly! ``` **After** ```javascript // This is a long comment which will get // wrapped correctly. /// This is another long comment which /// will also get wrapped correctly. //// But this is a long comment which ///will NOT get wrapped correctly! ```Environment