gn

thing1's goat note implementation
Log | Files | Refs

commit 9a9bd6657dc82662567b748434a8547acc7c0193
parent fdd3b5de6061ab4fdee05c9092375794fea7a7c9
Author: thing1 <thing1@seacrossedlovers.xyz>
Date:   Mon, 10 Feb 2025 08:20:36 +0000

added the ability to process whitespace propperly

Diffstat:
M.gitignore | 2+-
Mgn.c | 4+++-
2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -1 +1 @@ -./gn +gn diff --git 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) {