disallow invalid name characters

This commit makes using invalid characters in the name a fatal error.
Before this patch, "foo | bar(1)" would parse as "foobar(1)". Now it is
a fatal error and parsing stops.
master
Zandr Martin 6 years ago committed by Drew DeVault
parent cc125317dd
commit f7fb07006a
  1. 2
      src/main.c

@ -138,6 +138,8 @@ static void parse_preamble(struct parser *p) {
}
fprintf(p->output, "\n");
break;
} else {
parser_fatal(p, "Name characters must be A-Z, a-z, 0-9, `-`, `_`, or `.`");
}
}
str_free(name);

Loading…
Cancel
Save