diff options
author | Peter Simons <simons@cryp.to> | 2009-12-23 19:38:27 +0100 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2009-12-23 19:38:27 +0100 |
commit | 4cb8ca3f2be106bdaf8d5a403a2d69bc241de03d (patch) | |
tree | b750727693c387a7f17738636cf8f3308e315810 | |
parent | 36145ced94bebf806d8191fdc9ec6a1aaa803172 (diff) | |
download | autoconf-archive-4cb8ca3f2be106bdaf8d5a403a2d69bc241de03d.tar.gz |
macro.py: assert that the header section of the macro files don't contain tabs
-rwxr-xr-x | macro.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -65,6 +65,8 @@ class Macro: # header and body are separated by an empty line. (header,body) = loadFile(filePath).split("\n\n", 1) self.body = body.split('\n') + # headers may not contain tab characters + assert not ('\t' in header) # drop initial header (if present) header = re.sub(r"^\n*# =+\n#[^\n]*\n# =+\n(#\n)+", '', header, 1) # split buffer into lines and drop initial "# " prefix in the process |