diff options
author | thing1 <thing1@seacrossedlovers.xyz> | 2025-02-10 08:20:36 +0000 |
---|---|---|
committer | thing1 <thing1@seacrossedlovers.xyz> | 2025-02-10 08:20:36 +0000 |
commit | 9a9bd6657dc82662567b748434a8547acc7c0193 (patch) | |
tree | aca6c3bbd494c92673ce165968ebb2ad39c095b8 | |
parent | fdd3b5de6061ab4fdee05c9092375794fea7a7c9 (diff) |
added the ability to process whitespace propperly
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | gn.c | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -1 +1 @@ -./gn +gn @@ -44,6 +44,9 @@ void printashtml(token t) { char *stripwhitespace(char *expr) { while (isblank(expr[0])) expr++; + + while (isblank(expr[strlen(expr) - 1])) expr[strlen(expr) - 1] = 0; + return expr; } @@ -89,7 +92,6 @@ int main(int argc, char **argv) { case '{': i = readuntil(file, i, '}', TODO); break; case '-': i = readuntil(file, i, '\n', BULLET); break; } - } switch (m) { |