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 /gn.c | |
parent | fdd3b5de6061ab4fdee05c9092375794fea7a7c9 (diff) |
added the ability to process whitespace propperly
Diffstat (limited to 'gn.c')
-rw-r--r-- | gn.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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) { |