mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-26 14:51:36 +03:00
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:
parent
da4b7e430f
commit
c5a72103bf
@ -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("ereg, quotestr, NANO_REG_EXTENDED);
|
||||
|
Loading…
Reference in New Issue
Block a user