Commit c49ee849 c49ee849a732ac1e4736ccef0e5621f7b26ca1b3 by Sergey Poznyakoff

Allow #include within a :text block

1 parent a10ca99e
...@@ -350,6 +350,7 @@ text: { BEGIN(ML); multiline_begin (); } ...@@ -350,6 +350,7 @@ text: { BEGIN(ML); multiline_begin (); }
350 multiline_add (); 350 multiline_add ();
351 multiline_finish (); 351 multiline_finish ();
352 return MULTILINE; } 352 return MULTILINE; }
353 <ML>#[ \t]*include.*\n { sieve_include (); }
353 <ML>.*\n { sieve_line_num++; multiline_add (); } 354 <ML>.*\n { sieve_line_num++; multiline_add (); }
354 {WS} ; 355 {WS} ;
355 \n { sieve_line_num++; } 356 \n { sieve_line_num++; }
...@@ -439,7 +440,7 @@ sieve_include () ...@@ -439,7 +440,7 @@ sieve_include ()
439 if (usepath && name[0] != '/' && memcmp (name, "..", 2)) 440 if (usepath && name[0] != '/' && memcmp (name, "..", 2))
440 { 441 {
441 char *p = name; 442 char *p = name;
442 if (list_do (sieve_include_path, _try_include, &p)) 443 if (sieve_include_path && list_do (sieve_include_path, _try_include, &p))
443 { 444 {
444 push_source (p); 445 push_source (p);
445 free (name); 446 free (name);
......