--- parser3/src/main/pa_string.C 2001/04/23 13:38:31 1.78 +++ parser3/src/main/pa_string.C 2001/04/26 11:37:40 1.80 @@ -5,7 +5,7 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: pa_string.C,v 1.78 2001/04/23 13:38:31 paf Exp $ + $Id: pa_string.C,v 1.80 2001/04/26 11:37:40 paf Exp $ */ #include "pa_config_includes.h" @@ -336,7 +336,11 @@ const Origin& String::origin() const { // determining origin by last appended piece // because first one frequently constant. // ex: ^load[/file] "document_root" + "/file" - return append_here[-1].item.origin; + // when last peice is constant, + // ex: parser_root_auto_path{dynamic} / auto.p{const} + // using first piece + Origin& last_origin=append_here[-1].item.origin; + return last_origin.file ? last_origin : head.rows[0].item.origin; } #endif @@ -463,7 +467,7 @@ static void regex_options(char *options, int *result; } regex_option[]={ {'i', 0, PCRE_CASELESS, result}, // a=A - {'s', 0, PCRE_DOTALL, result}, // \n\n$ + {'s', 0, PCRE_DOTALL, result}, // \n\n$ [default] {'x', 0, PCRE_EXTENDED, result}, // whitespace in regex ignored {'m', PCRE_DOTALL, PCRE_MULTILINE, result}, // ^aaa\n$^bbb\n$ {'g', 0, true, result+1}, // many rows