Rewrap icon indicating copy to clipboard operation
Rewrap copied to clipboard

Reformatting whitespace between sentences within paragraphs

Open david-bojnansky opened this issue 3 years ago • 1 comments

Hello I propose a feature to add an option to separate whole sentences (ending with . ? ! ...) by two or more spaces (based on another setting) instead of one only.

Example:

// Allow accessing UMD exports 
// as globals from inside module files.
// A module file is a file that has 
// imports and/or exports. Without this                                     <--- one space behind dot
// flag, using an export from a UMD module requires an import declaration.

-->

// Allow accessing UMD exports as globals from inside module files.
// A module file is a file that has imports and/or exports.  Without this   <--- two spaces behind dot
// flag, using an export from a UMD module requires an import declaration.

david-bojnansky avatar Nov 30 '21 05:11 david-bojnansky

Yeah this feature was previously requested in #138 and has also been requested in #295 (it's the same feature, just adding a newline instead of 2 spaces). I've been wary of inspecting and reformatting text like this, since it seems outside the scope of this extension (from just handling line wrapping to a general (re)formatter).

But I want this tool to be useful too, so I may well cave to pressure here :)

stkb avatar Dec 01 '21 18:12 stkb