justify: extend the quoting regex, to cover more types of comments

Now also comment blocks in Fortran, Lisp, Lua, Postgres, and TeX
can be rewrapped with ^J.

This partially addresses https://savannah.gnu.org/bugs/?55435.
Kind-of-requested-by: David Griffith <dave@661.org>
This commit is contained in:
Benno Schulenberg 2019-01-22 17:50:34 +01:00
parent da4b7e430f
commit c5a72103bf
1 changed files with 1 additions and 1 deletions

View File

@ -2468,7 +2468,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);