Minification exclusion
This commit is contained in:
@@ -3,5 +3,6 @@
|
||||
#define VAR_CHAR '!'
|
||||
#define SET_CHAR '='
|
||||
#define AUTOESCAPE_CHAR '\\'
|
||||
#define NOMINIFY_CHAR '&'
|
||||
|
||||
#define MAX_INCLUDE_DEPTH 10
|
||||
|
||||
10
src/parse.c
10
src/parse.c
@@ -105,8 +105,7 @@ static int writefile(struct expandfile *file, FILE *out) {
|
||||
}
|
||||
case AUTOESCAPE_CHAR:
|
||||
for (++i; data->data[i] != ESCAPE_CHAR &&
|
||||
i < data->len;
|
||||
++i) {
|
||||
i < data->len; ++i) {
|
||||
switch (data->data[i]) {
|
||||
case '&':
|
||||
fputs("&", out);
|
||||
@@ -125,6 +124,11 @@ static int writefile(struct expandfile *file, FILE *out) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case NOMINIFY_CHAR:
|
||||
for (++i; data->data[i] != ESCAPE_CHAR &&
|
||||
i < data->len; ++i)
|
||||
fputc(data->data[i], out);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -161,7 +165,7 @@ static int expandfile(struct expandfile *ret, char *filename, int level) {
|
||||
if (appendchar(ret->data, ESCAPE_CHAR))
|
||||
goto error;
|
||||
break;
|
||||
case VAR_CHAR: case AUTOESCAPE_CHAR:
|
||||
case VAR_CHAR: case AUTOESCAPE_CHAR: case NOMINIFY_CHAR:
|
||||
if (appendchar(ret->data, ESCAPE_CHAR))
|
||||
goto error;
|
||||
for (;;) {
|
||||
|
||||
Reference in New Issue
Block a user