about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--scan.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/scan.c b/scan.c
index 7fa58d0..3da54fe 100644
--- a/scan.c
+++ b/scan.c
@@ -38,11 +38,15 @@ oneline(char *file)
 	lineno++;
 
 	int indent = 0;
-	while (*file == ' ') {
+	while (*file == ' ' || *file == '\t') {
 		indent++;
 		file++;
 	}
 	indent *= 2;
+
+	char *e = file + strlen(file) - 1;
+	while (file < e && (*e == ' ' || *e == '\t'))
+		*e-- = 0;
 	
 	struct message *msg = blaze822(file);
 	if (!msg) {