nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 33fea90bcd6a09bee9d53d7d6c6bb4f87979279f
parent f03c87c300f3626d45a0dc1af2ba6ea2f3820d26
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sat,  8 Jun 2019 16:31:37 +0200

justify: remove "--" from the quoting regex, to avoid false paragraphs

The use of a double dash (for an option name or as sentence separator)
is too common to allow it to be seen always as a comment introducer.
Users of Lua and Postgres will have to redefine 'quotestr' themselves
if they want to be able to rewrap block comments with ^J.

The other characters that were added in commit c5a72103 (!, %, and ;)
are less problematic because they tend to be glued to the end of words,
so they are unlikely to appear at the start of a line.

This fixes https://savannah.gnu.org/bugs/?56462,
and fixes https://savannah.gnu.org/bugs/?56461.

Bug existed since version 4.0, commit c5a72103.

Diffstat:
Msrc/nano.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/nano.c b/src/nano.c @@ -2444,7 +2444,7 @@ int main(int argc, char **argv) if (brackets == NULL) brackets = mallocstrcpy(NULL, "\"')>]}"); if (quotestr == NULL) - quotestr = mallocstrcpy(NULL, "^([ \t]*([!#%:;>|}]|/{2}|--))+"); + quotestr = mallocstrcpy(NULL, "^([ \t]*([!#%:;>|}]|/{2}))+"); /* Compile the quoting regex, and exit when it's invalid. */ quoterc = regcomp(&quotereg, quotestr, NANO_REG_EXTENDED);