From 361577caad80011ab98e02d589831d32ccc5e566 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sun, 7 Apr 2024 12:01:06 -0700 Subject: [PATCH] Trim leading whitespace --- examples/test.modal | 7 +++++-- src/modal.c | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/test.modal b/examples/test.modal index 304459e..25b461d 100644 --- a/examples/test.modal +++ b/examples/test.modal @@ -1,3 +1,6 @@ -<> ((explode ?*)) (?*) +<> (explode ?*) (?*) -(explode hello) \ No newline at end of file + +<> (?x pin) (done: ?x) + +(explode hello) pin \ No newline at end of file diff --git a/src/modal.c b/src/modal.c index 68c4366..1b50249 100644 --- a/src/modal.c +++ b/src/modal.c @@ -168,6 +168,7 @@ static int rewrite(char *incoming) { char c, *p = direction ? bank_b : bank_a; + while(*p == 0xa || *p == ' ') p++; while((c = *p)) { int i; if(p[0] == '<' && p[1] == '>') {