mirror of
git://git.sv.gnu.org/nano.git
synced 2025-01-25 10:42:07 +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)
|
if (brackets == NULL)
|
||||||
brackets = mallocstrcpy(NULL, "\"')>]}");
|
brackets = mallocstrcpy(NULL, "\"')>]}");
|
||||||
if (quotestr == NULL)
|
if (quotestr == NULL)
|
||||||
quotestr = mallocstrcpy(NULL, "^([ \t]*([#:>|}]|/{2}))+");
|
quotestr = mallocstrcpy(NULL, "^([ \t]*([!#%:;>|}]|/{2}|--))+");
|
||||||
|
|
||||||
/* Compile the quoting regex, and exit when it's invalid. */
|
/* Compile the quoting regex, and exit when it's invalid. */
|
||||||
quoterc = regcomp("ereg, quotestr, NANO_REG_EXTENDED);
|
quoterc = regcomp("ereg, quotestr, NANO_REG_EXTENDED);
|
||||||
|
Loading…
Reference in New Issue
Block a user