summaryrefslogtreecommitdiff
path: root/gn.c
diff options
context:
space:
mode:
authorthing1 <thing1@seacrossedlovers.xyz>2025-02-10 08:20:36 +0000
committerthing1 <thing1@seacrossedlovers.xyz>2025-02-10 08:20:36 +0000
commit9a9bd6657dc82662567b748434a8547acc7c0193 (patch)
treeaca6c3bbd494c92673ce165968ebb2ad39c095b8 /gn.c
parentfdd3b5de6061ab4fdee05c9092375794fea7a7c9 (diff)
added the ability to process whitespace propperly
Diffstat (limited to 'gn.c')
-rw-r--r--gn.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gn.c b/gn.c
index f3286b9..58b5296 100644
--- a/gn.c
+++ b/gn.c
@@ -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) {