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 commitmasterc5a72103
(!, %, 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, commitc5a72103
.
parent
f03c87c300
commit
33fea90bcd
|
@ -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("ereg, quotestr, NANO_REG_EXTENDED);
|
||||
|
|
Loading…
Reference in New Issue